Monday, August 3, 2015

Improving Windows Cmd Experience

Having worked in Unix world and then moved to windows, I have always felt
the pain of not having a good shell. Windows command is painfully bad.
Even copying and pasting is difficult.

The things that miss the most from the unix shell are:

    - command history - the command history in default windows cmd is very
      restrictive. The history is not maintained across restarts of the
      cmd. Also, within on season, one has to use both up and down key.
      Navigating back in history will cause the position in the history to
      change, rather than add the command back to the history queue.

    - reverse search- using up and down key is very combursome
      especially for long history. A reverse search helps in saving
      time.

    - Powerful auto completion - hitting tab in windows cmd does weird
      things. It cycles through the list instead of completing the word
      till the point where the differences start.
   
    - Tabbed and Split screen- I use multiple cmd windows. Not having
      tabbed/ split view is a very bad loss of productivity, since I have
      to keep switching windows. Using alt-tab to switch between windows
      cycles through a large list of windows that I have kept open and
      this consumes time. Using a mouse is a no-no.

 etc among tons of other features.

Windows PowerShell solves the command history part of the problem, but
it doesn't quite feel like unix shell.

Recently, a coworker suggested to me to have a look at conemu, a console
emulator. This allow one to use split windows and tabs. It supports copy
pasting from the cmd window. You can also customize the color scheme.

Galvanised by this, I started searching for a similar tool for reverse
search. I found clink.

All one has to do is install clink, and it automatically adds itself to cmd by
injecting a DLL into it. The DLL then hooks the WriteConsole() and
ReadConsole() Windows functions.

With the combination of ConEmu and clink, I now have a good shell
replacement.

Thanks a ton for such tools. Also, I am sucker for tools which improve
productivity !!!