A big advantage of working in console mode is ability to create aliases. First you can easily shorten a command with a lot of switches. You can also automate your job by creating a script file and then set an alias for that script.
The default way of creating aliases in Windows is DOSKEY:
doskey np=notepad++.exe $*
The weak point of it is that you have to reassign them after restarting console window. There are ways for automating that using cmd.exe /k switch or using system
registry (see https://gist.github.com/vladikoff/38307908088d58af206b both article and comments).
There is also a buil-in option for ConEmu:
But all in all this is weak, as always you have to do two things: establish an
alias and then save it in some file for future use.
Alternative (better!) solution
I can sell you my way of dealing with aliases. I don’t use DOSKEY. Instead, I have a folder, i.e. C:\Tools\Aliases and there. I have a lot of *.cmd or *.ps1 files. The trick is that the folder is in my PATH variable.
Let’s say I have there a !notes.cmd command that runs:
Then I can type ‘!notes’ and it runs “!notes.cmd” file that results in openning my temporary notes file. Obviously TAB autocompletion works fine. ‘!’ in the beginning lets me filter out my own aliases. I have also “!editaliases.cmd” for editing my aliases:
Aliases are ready to use just after adding/editing them.
- no fancy escape characters (doskey defines its own list)
- I can assing a whole script to an alias with one file
- works in every console and emulator