Unfortunately, Windows default command interpreter (cmd.exe) does not include support for command-line aliases, as in bash, zsh and other /bin/*sh type shells that can be found in the world of Linux. This can be partially corrected.
To implement the use of aliases we can use a simple program called “Doskey”:
Create a file that will store our aliases (in Doskey terminology – “macroses”), for example, C:\Users\a\etc\a.doskey.
Type in the command to automatically setup the aliases/macroses at the start of command interpreter to the registry.
To do this, let’s change the value of the AutoRun key of the following thread in the registry:
to the following: doskey /macrofile=C:\Users\a\etc\a.doskey (if there is no AutoRun key, then you should create it).
And that’s it. A couple of examples now:
Let’s add the following lines to C:\Users\a\etc\a.doskey:
svnh=svn help $* | more
svnhelp=svn help $* | more
svnco=svn co $*
Lines 1 and 2 are service commands to edit and update the aliases in the current command interpreter.
Lines 3, 4 and 5 are several aliases for working with SVN ($* means the assignment of all arguments of the command-line to macros).
Alternatively, you can create a separate bat-file for each alias, but the solution using aliases may be more elegant.