mirror of
https://github.com/cmderdev/cmder.git
synced 2024-11-10 17:59:11 +08:00
0a5d1ac156
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>".
16 lines
441 B
Plaintext
16 lines
441 B
Plaintext
;= @echo off
|
|
;= rem Call DOSKEY and use this file as the macrofile
|
|
;= %SystemRoot%\system32\doskey /listsize=1000 /macrofile=%0%
|
|
;= rem In batch mode, jump to the end of the file
|
|
;= goto:eof
|
|
;= Add aliases below here
|
|
e.=explorer .
|
|
gl=git log --oneline --all --graph --decorate $*
|
|
ls=ls --show-control-chars -F --color $*
|
|
pwd=cd
|
|
clear=cls
|
|
history=cat -n %CMDER_ROOT%\config\.history
|
|
unalias=alias /d $1
|
|
vi=vim $*
|
|
cmderr=cd /d "%CMDER_ROOT%"
|