Better cmd.exe terminal and ANSI color codes support

If you’ve got an Android phone and you know what ADB is and you are using a Windows machine primarily, chances are you’ve been annoyed by stuff like this in the past.

Those little arrows with numbers are called “ANSI Escape Sequences“, which under Linux (and whatever UNIX flavors) are pretty common and are used for a bunch of stuff, which you can read on the Wiki page I linked because I’m too lazy to do it for you, and for color output!

We all know cmd.exe is a bunch of steaming pile of shit if you ever tried to use a terminal on Windows for other stuff than pinging an IP address. Amongst cmd.exe’s technical limitations, I’m pissed off by:

  • Not being able to resize the window vertically
  • Not being able to copy lines properly
  • I want tabs, kthxbye

So, in my searches I’ve stumbled upon Console which is a console window enhancement for Windows.

Console2 Main Window


By itself fixes a number of things I really hated, but still has one issue – it’s still using cmd.exe “in the background” thus it doesn’t support ANSI properly.

Here’s where I found another “little helper”: ANSICON. From the author’s page: “ANSICON provides ANSI escape sequence recognition for Windows console programs (both 32- (x86) and 64-bit (x64)). It is basically the Windows equivalent of ANSI.SYS.”.

So, what I did to “marry” these 2 great “programs” in a perfect harmony under Windows (because I like to do WinKey + R -> console ) was to extract BOTH Console and ANSICON under the C:Windows directory (because I’m lazy like that, and I don’t like to edit the PATH in Windows), then in Console I set up the default terminal to be ansicon.exe:

ansicon.exe in console2

ansicon.exe in console2

The result?

abd shell displaying proper ansi colors in console2

Oh, and before I forget, a free tip: to copy/select something, press Shift and drag the mouse cursor.