Page 1 of 1

Command line: access list of all commands and aliases; their and latest command lines history-list filter

Posted: 2020-02-09, 20:45 UTC
by DrShark
I have 2 related suggestions to improve Total Commander's command line:
1. Alt+F8 in empty command line opens a latest command lines history-list.
Ctrl+Down, when cursor is in Command line, opens the same list and also adds latest command into command line.
Ctrl+Up, when focus is in Command line and a list opened by Ctrl+Down or Alt+F8 is opened, just adds latest command into command line, and when list is not opened, it doesn't do anything.
Since function which is done by Ctrl+Up is a part of feature called by Ctrl+Down,
my suggestion is to use Ctrl+Up for different purpose: to open a list, similar to one by Alt+F8, but with list of all commands present in cm_commandbrowser, as well as all aliases.

2. When Alt+F8 list is opened, or user clears command line input while Ctrl+Down list is opened,
and then starts typing in empty command line, I suggest to filter opened history list by first characters typed in command line, so it will only show commands that match entered characters.
It's similar to how Auto-Complete works in command line when Alt+F8/Ctrl+Down lists aren't opened, or how Quick Search (Ctrl+S) filter works in file panles.
If suggetion 1 will be implemented, for its list I suggest to implement the same filtering too.

Re: Command line: access list of all commands and aliases; their and latest command lines history-list filter

Posted: 2020-02-09, 22:21 UTC
by petermad
Ctrl+Down opens the same list and also adds latest command into command line.
Ctrl+Up just adds latest command in command line.
If this is a description of the current behaviour - that is not quite what I see - I see:
ONE press on Ctrl+Down inserts the last used command in the command line and sets focus to the command line (just like ONE pres on Ctrl+E)
TWO presses on Ctrl+Down inserts the last used command in the command line AND opens the history (like Ctrl+E + Alt+F8 OR Alt+F8 + Down)
Ctrl+Up opens directory under cursor in new tab.

keyboard.txt / help:
CTRL+UP Open dir under cursor in new tab
So you are basically asking for a total redefinition of an established shortcut.

BTW - I don't see Ctrl+Down documented in neither the help nor the history.txt.

Re: Command line: access list of all commands and aliases; their and latest command lines history-list filter

Posted: 2020-02-10, 01:13 UTC
by Usher
It's misunderstanding.
1. @DrShark describes action after pressing Alt+F8: you can use Up and Down or Ctrl+Up and Ctrl+Down. The difference is in the end - when you go up and hit the top of the history list. With Up scrolling stops, with Ctrl+Up the list is closed.
2. You can also use Ctrl+Down without pressing Alt+F8. It starts working as @petermad described, then works as Down in p.1. Now the difference is in the beginning.

Re: Command line: access list of all commands and aliases; their and latest command lines history-list filter

Posted: 2020-02-10, 07:00 UTC
by DrShark
petermad wrote: 2020-02-09, 22:21 UTC
Ctrl+Down opens the same list and also adds latest command into command line.
Ctrl+Up just adds latest command in command line.
If this is a description of the current behaviour - that is not quite what I see - I see:
ONE press on Ctrl+Down inserts the last used command in the command line and sets focus to the command line (just like ONE pres on Ctrl+E)
TWO presses on Ctrl+Down inserts the last used command in the command line AND opens the history (like Ctrl+E + Alt+F8 OR Alt+F8 + Down)
Ctrl+Up opens directory under cursor in new tab.

keyboard.txt / help:
CTRL+UP Open dir under cursor in new tab
So you are basically asking for a total redefinition of an established shortcut.
For both Ctrl+Down and Ctrl+Up, I indeed described behavior (and suggested behavior) when cursor is already in command line (e.g. set there with Shift+RighArrow). I edited the first post to reflect this. Actually when cursor is in command line, Ctrl+Up behavior depends on whether Alt+F8/Ctrl+Down list is opened: if it is, Ctrl+Up inserts latest command into command line, if it isn't - Ctrl+Up just does nothing (this is also added to first post now).
So in this case redefining Ctrl+Up to new behavior by default (opening a list of all commands and aliases) doesn't conflict with existing TC features (again, will be still possible to insert latest command with Ctrl+Down or Ctrl+E).
petermad wrote: 2020-02-09, 22:21 UTCBTW - I don't see Ctrl+Down documented in neither the help nor the history.txt.
It is documented (as CTRL-CURSORDOWN) in help .

Re: Command line: access list of all commands and aliases; their and latest command lines history-list filter

Posted: 2020-02-11, 01:29 UTC
by petermad
It is documented (as CTRL-CURSORDOWN) in help .
Ahh - thanks. :-)

I should know - I commented on it here https://www.ghisler.ch/board/viewtopic.php?p=361524#p361524 only 3 month ago (i am getting old) ;-)