Windows Aliases in CMD similar to Bash aliases

Windows Aliases in CMD similar to Bash aliases

Add command line aliases to Windows in two copy-paste steps

(
echo/@echo off
echo/doskey grep=grep --color=auto $*
echo/doskey l=ls -CF --color=auto $*
echo/doskey la=ls -A --color=auto $*
echo/doskey ll=ls -alF --color=auto $*
echo/doskey ls=ls --color=auto $*
) >"%HOME%\.bashrc_win.bat"

And make it autoexecuted:

reg add "HKCU\Software\Microsoft\Command Processor" /f /v "AutoRun" /t REG_SZ /d "\"%HOME%\.bashrc_win.bat\""
date 13. Jan 2013 | modified 10. Jun 2024
filename: Windows » CLI » Aliases in CMD