armannvg


Software developer, working mainly in C++, Python, and C#


Moving over to cmder

One the biggest problems I have always had with Windows is the default (cmd.exe) shell that comes with it. It just feels like its commands don't bend properly to my will and its lack of history between sessions is extremely frustrating (been waiting for that one for years).

Perhaps it's because I have used the Linux shell so much over the years and its commands are essentially my go-to tools when I need to get things done. To Microsoft's credit though, they have been moving PowerShell in the right direction but I still don't feel that is enough.

I've tried to emulate the Linux shell behavior on Windows for years now. Few notable applications that do exactly this are Cygwin and Console2 but I never got them to behave exactly like I wanted. This is probably exactly how developers get fused to older editors like Emacs or Vi, where they have specific keybindings that are wired to their brain and leads to maximum efficiency in writing out text. I even know people who claim that Midnight Commander is the best file manager out there (it doesn't look the part, but maybe I'm missing something).

This is where cmder entered my life about 2 years ago, I've never found such a good shell running on Windows that is suited exactly to my needs. All the linux commands that I use the most are in there (e.g. tail, ls, less, grep, and cat) along with the usual operators (e.g. |, &&, >, and >>) so I'm able to do my usual Linux commands in Windows without problems. The only command I've found missing is man but that info can be found at some man page site. Cmder is also completely standalone, so in theory I should be able to keep it on an USB drive and use it on just about any Windows machine (given that it is a relatively new version).

The final element that completely sold me cmder is that I can setup clink as an extension in the Vendor folder, which enables using recursive search for commands. That means I can lookup previously executed statements and run them again very quickly (just like on Linux), so if I keep my statements generic enough (read: not dependent on the folder you are currently in) then it's simple to execute the same things over and over again. That should save us developers few precious seconds every day.

Another tweak that I have made is to add a menu item in the explorer context menu. This will allow me to quickly open a cmder window in the folder I'm looking at. This can be done by adding a registry key and following is a .reg script if you want to get this up and running on your machine (I keep cmder at c:\cmder):

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Open cmder here\command]
@="c:\\\\cmder\\\\cmder.exe \"%V\""

That's it for now. I will keep on building on cmder from here on out and going by the pragmatic programmer then it is one of the few tools that I work on being very proficient at using (other tools that fall into this category are Sublime Text 2, Visual Studio, and the run button), all part of being as quick as possible in solving the everyday programming problems.