Closed TNSaturday closed 11 months ago
Then don't do that! 😉
(Updated)
There is an ls
doskey macro which expands to ls --show-control-chars -F --color
.
Doskey macros are how aliases are done in cmd on Windows. Doskey macros are designed to only expand if they are the first thing on the command line. A space or command or >nul
or anything else at the beginning of a command line disables doskey macro expansion.
It's not bug, it's just how they're designed to work. It means whenever you need to bypass a doskey macro, you can simply insert a space (similar to how you can bypass aliases in bash by adding quotes, e.g. ls
runs an alias and 'ls'
runs the raw ls program).
If you dislike how doskey macros behave, then you could use a batch script instead of a doskey macro.
Version Information
Cmder Edition
Cmder Full (with Git)
Description of the issue
Prepend "ls -lah" command with a leading space and the output loses syntax highlighting (i.e. folders being shown in blue):
How to reproduce
In any folder press space, then "ls -lah"
Additional context
No response
Checklist