mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-14 07:29:12 +08:00
Use cat -n for printing history to show cmd index
Currently the "history" command in Cmder prints commands without any index associated with any command, so you can copy/paste a command or use "!!" to execute a command from the history but, unlike BASH, you can't do "!<command_index>". "cat" has a switch, "-n", which prints line numbers of the file being printed. This, in conjunction with "history_io=3" in Clink settings (to read/write history when editing a command") works just like BASH, i.e., you can use the index printed next to a command in the history to execute that command as "!<command_index>".
This commit is contained in:
parent
46d5936806
commit
0a5d1ac156
2
vendor/user-aliases.cmd.example
vendored
2
vendor/user-aliases.cmd.example
vendored
@ -9,7 +9,7 @@ gl=git log --oneline --all --graph --decorate $*
|
|||||||
ls=ls --show-control-chars -F --color $*
|
ls=ls --show-control-chars -F --color $*
|
||||||
pwd=cd
|
pwd=cd
|
||||||
clear=cls
|
clear=cls
|
||||||
history=cat %CMDER_ROOT%\config\.history
|
history=cat -n %CMDER_ROOT%\config\.history
|
||||||
unalias=alias /d $1
|
unalias=alias /d $1
|
||||||
vi=vim $*
|
vi=vim $*
|
||||||
cmderr=cd /d "%CMDER_ROOT%"
|
cmderr=cd /d "%CMDER_ROOT%"
|
||||||
|
Loading…
Reference in New Issue
Block a user