[Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

[Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *JOUBE »

ghisler(Author) wrote: 2023-05-01, 14:34 UTC For now I have added the following commands:
...
cm_ShowCmdLineHistory (like Alt+F8)
cm_AddFileNameToCmdLine
cm_AddPathAndFileNameToCmdLine
Unfortunately the internal command cm_AddToCmdLine "TEXT" is missing. This should be easy to implement and would be very useful.

Background: If you are on a remote computer via SFTP plugin, there is no way to call alias commands (see here: Aliases...). The complete command (e.g. calling a script (xyz.sh) on the remote computer) must contain all parameters and, if necessary, the leading "./" (./xyz.sh -1 -2 -3 -4 --p5 - 6 -p7) appear exactly like this in the Tc command line. Unfortunately, there is no way to pin commands to the command line history.

Please implement this in Tc11.02 or at least in Tc11.03...

Or much more simple:
Simply extend the new internal command cm_AddFileNameToCmdLine with the parameter "TEXT", where TEXT replaces the filename.

This would be simply to implement but a very useful additional feature.

Thanks

Joube

*) Unfortunately I missed this post in the thread: Re: Internal DC commands, which are very lacking in TC, so I am late with my suggestion, sorry.
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *Fla$her »

Code: Select all

TCFS2.exe /ef "tcm(4003,1) eval(send_wait(`{END}./xyz.sh -1 -2 -3 -4 --p5 - 6 -p7`,findwnd(Edit,,,0,1)))"
Overquoting is evil! 👎
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *JOUBE »

Fla$her wrote: 2023-10-21, 10:11 UTC

Code: Select all

TCFS2.exe /ef "tcm(4003,1) eval(send_wait(`{END}./xyz.sh -1 -2 -3 -4 --p5 - 6 -p7`,findwnd(Edit,,,0,1)))"
Sorry, I don't use external programs like that... (Unless I wrote them myself). I prefer a true TC solution. So the request remains, especially since it is easy to implement.

Joube
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *Fla$her »

JOUBE wrote: 2023-10-21, 10:58 UTClike that... (Unless I wrote them myself)
:shock: :?:
Overquoting is evil! 👎
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *JOUBE »

I really don't understand why everything around was developed for Tc11, but this obvious thing was neither proposed nor implemented for Tc11.

Therefore, it seems to me not too late for version Tc11 and would be very useful for example for SFTP: please insert the command cm_AddToCmdLine "TEXT" or expand the new command cm_AddFileNameToCmdLine "TEXT"

Joube
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *ghisler(Author) »

I really don't understand why everything around was developed for Tc11, but this obvious thing was neither proposed nor implemented for Tc11.
Have you seen how many threads there are in the suggestions forum? Everyone thinks that his/her idea is the center of the world, but it's impossible to implement all of them. First due to time restrictions, and second because then TC would become a huge monster app which could no longer be used.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *Fla$her »

ghisler(Author) wrote: 2023-10-24, 07:22 UTC Everyone thinks that his/her idea is the center of the world
I don't agree with this assessment. Some topics look like this, but not all. There are pressing requests, the implementation of which looks quite simple, but it is unclear why priority is given to less popular or non-functional innovations. People often complain that many important topics have been hanging unclaimed for years. But it is necessary to separate the complex-realizable and the simple-realizable.
ghisler(Author) wrote: 2023-10-24, 07:22 UTCand second because then TC would become a huge monster app which could no longer be used.
A somewhat strange conclusion. TC is a wrapper for plugins and utilities that extend its features. Many assemblies weigh 1-2 GB or more, but people do not believe that they cannot be used because of this. Some requests are implemented in other file managers, which for some reason users do not call monsters. :)
Overquoting is evil! 👎
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *JOUBE »

ghisler(Author) wrote: 2023-10-24, 07:22 UTC
I really don't understand why everything around was developed for Tc11, but this obvious thing was neither proposed nor implemented for Tc11.
Have you seen how many threads there are in the suggestions forum? Everyone thinks that his/her idea is the center of the world, but it's impossible to implement all of them. First due to time restrictions, and second because then TC would become a huge monster app which could no longer be used.
Please add this simple thing (cm_AddToCmdLine "TEXT" or cm_AddTextToCmdLine "TEXT") to Tc11. Tc11 doesn't become a monster app from it. It is very useful *) and very easy to implement and has very little bug potencial. Please consider it just as another addition to the new features (cm_AddFileNameToCmdLine, cm_AddPathAndFileNameToCmdLine) that is simply forgotten to implement...

Thanks

Joube

*) Especially for SFTP, which usage is growing and growing. (Edit:) Within SFTP-Plugin it is possible to use server commands and scripts on the Tc command line (this is very good and usefull), but it is not possible to use server aliases there, because of the limitations of the non-interactive shell in this case. So if the aliases have long text (which is the nature of aliases) and are not often used, you have to write the command down by hand at the Tc command line, which is tedious.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *ghisler(Author) »

I will consider it. Unfortunately TC 11.02 is already quite late in the beta test, and adding new functions will always add new bugs too.

But there is a way to do it via a scripting tool like AutoHotkey:
1. Send WM_USER+50 to the Total Commander main window with wparam set to 20 for the command line
-> the return value of SendMessage is the window handle of the command line
2. Call SetWindowTextW with the received window handle to set the command line field
Author of Total Commander
https://www.ghisler.com
JOUBE
Power Member
Power Member
Posts: 1477
Joined: 2004-07-08, 08:58 UTC

Re: [Tc11.02RC3] Internal command cm_AddToCmdLine "TEXT" is missing

Post by *JOUBE »

ghisler(Author) wrote: 2023-10-25, 07:59 UTC I will consider it.
Thanks.
ghisler(Author) wrote: 2023-10-25, 07:59 UTC Unfortunately TC 11.02 is already quite late in the beta test, and adding new functions will always add new bugs too.
This suggestion has very low bug risk. I think you agree. So give it a chance within 11.02 (or in 11.03 instead)
ghisler(Author) wrote: 2023-10-25, 07:59 UTC But there is a way to do it via a scripting tool like AutoHotkey:
1. Send WM_USER+50 to the Total Commander main window with wparam set to 20 for the command line
-> the return value of SendMessage is the window handle of the command line
2. Call SetWindowTextW with the received window handle to set the command line field
I know this, but I don't like fiddling with Autohotkey...

Joube (I know, I'm very late with this simple suggestion, sorry. But I can't help asking you here in the forum why you didn't think of it in May 2023)
Post Reply