Skip to content

Instantly share code, notes, and snippets.

@djKianoosh
Last active October 2, 2015 01:38
Show Gist options
  • Save djKianoosh/2146933 to your computer and use it in GitHub Desktop.
Save djKianoosh/2146933 to your computer and use it in GitHub Desktop.
UNIX-like aliases in Windows
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
"DefaultColor"=dword:00000000
"EnableExtensions"=dword:00000001
"PathCompletionChar"=dword:00000009
"AutoRun"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,\
4c,00,45,00,25,00,5c,00,70,00,72,00,6f,00,66,00,69,00,6c,00,65,00,2e,00,62,\
00,61,00,74,00,00,00
@echo off
doskey alias=if ".$*." == ".." ( doskey /MACROS ) else ( doskey $* )
REM add these if you have git's ls utility on the path...
doskey ls=ls --color $*
doskey l=ls --color $*
doskey ll=ls -l --color $*
doskey ltr=ls -ltr --color $*
@echo on
@djKianoosh
Copy link
Author

Merge HKCU-Software-Microsoft-CommandProcessor.reg into registry, then save
profile.bat in %USERPROFILE%\profile.bat

Open a new command prompt...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment