Saturday, January 19, 2013

Console2 - A Better Windows Command Prompt


http://www.hanselman.com/blog/Console2ABetterWindowsCommandPrompt.asp
---
I was working on my Mac today and while I maintain that the OS X finder is as effective as shooting your hands fill of Novocaine, I remain envious of the simplicity of their Terminal. Not much interesting has happened in the command prompt world in Windows since, well, ever. I actually blogged about text mode as a missed opportunity in 2004. That post is still valid today, I think. Text is fast. I spend lots of time there and I will race anyone with a mouse, any day.


I blogged about Console2 as a better prompt for CMD.exe in 2005. Here we are 6 years later and I hopped over there to see Console2 was still being developed. They were on build 122 then, and they are, magically and to their extreme credit, still around and on build 147. Epic.

Open Source projects may be done, but they are never dead.

I downloaded Console2 at http://sourceforge.net/projects/console/files/ and put it c:\dev\utils which is in my PATH.

Here's how I set it up for my default awesomeness.

  • Right-click in the main console and click Edit | Settings.
  • Under Console, set your default Startup Directory
  • Under Appearance|More, hide the menu, status bar and toolbar.
  • Under Appearance, set the font to Consolas 15. Not 14, not 16. Black background, Kermit green foreground color.
  • Set Window Transparency to a nice conservative 40 for both Active and Inactive. Not too in your face, but enough glassiness to say "I'm a subtle badass."
  • Under Behavior set "Copy on Select"
  • Under Hotkeys, change the New Tab 1 hotkey to Ctrl-T because that's what it should be. You'll have to click on the hotkey, then in the textbox, then type the hot-key you want AND press Assign for it to stick.
  • Under Hotkeys, change Copy Selection to Ctrl-C and Paste to Ctrl-V then rejoice and wonder why Windows doesn't work like this today. At this point, you may want to device if you want "Copy on Select" to happen automatically under Behavior. That'll save you the Control-C if you like.
  • Now, the subtlety. Under Tabs, you (if you are me) want two default tabs, one for CMD.EXE and one for PowerShell because you don't like your peas and carrots to touch on your plate.
    • Set your Console|cmd.exe first tab to this shell if you want it to be a Visual Studio command prompt. Be aware of the PATH if you are not on x64 like I am.
    • Then, make another Tab called PowerShell with this path:
      • %SystemRoot%\syswow64\WindowsPowerShell\v1.0\powershell.exe
      • And I used the vspowershell.ico icon 'cause I'm into flair.
You'll have a nice "New Tab" option where you can make one of either shell. Note the general loveliness of this understated shell. I can open a new Tab with Ctrl-T (or lots) and use Ctrl-Tab to move between them. I took the screenshot with the background so you can see the transparency.
One final reason why Console2 rocks? It's freaking resizable in two directions, unlike the Windows CMD.exe console.
 (36)
Console2 is a great little front-end for your existing shell, no matter what it is. Note that Console2 isn't a shell itself, it's just a face on whatever you are already using. Enjoy.

----

To do list:
1. add Powershell
2. add Git Bash

No comments:

Post a Comment