Windows command shells

Windows needs a better terminal program. If you’re using Perl, you’re going to have an easier time dealing with life at a command line—that’s where Perl came from and how it’s oriented. That’s also how you’re likely to deal with Perl once you leave Windows. I’m certainly going to have an easier time since I’ve been a shell guy for a long time.

I’m ignoring cygwin and that bash terminal that it provides, or . If I fell back to that, everything is easy because it’s almost like running unix. Instead, I want to stay as close to Windows as I can, at least for this project. That’s where I see the greatest need and the most opportunity—even if cygwin ends up being the best answer.

I also need to note that a command shell is different from a terminal emulator. The latter connects (e.g. telnet and ssh) to something else and lets the remote side do the work. This is also different from IDEs where I might run my Perl program inside the same application where I edit it. I’m only interested in command shells in this one.

There are some important features for me:

  • easy cut and paste
  • tabs for multiple sessions in the same window
  • some sort of history
  • resizable, wide windows (past 80 columns)

My philosophy of tools is that there is no universal right tool. Some people will be more productive in those some people can’t get any work done. Try several and pick the one that you like best, reserving your option to change tools when you feel like it.

Tell me what you like by leaving a comment.

Included out of the box

The included applications are bare bones and reflect the good ol’ days of 80 column terminals. I can make the windows narrower but not wider. The cut-and-paste features are inept, and none of them have tabs. I can run multiple instances of a command interpreter though.

Command.com

Command.com is the old MS-DOS interpreter that suck around for the Windows 9x and Windows ME releases. I’m going to ignore it. If you’re still stuck on those systems, I’m sorry.

Command Prompt

The Command Prompt, also known as cmd.exe is the interpreter for Windows NT and Windows 2000 and later.

The clink adds bash-like features to Command Prompt. It comes out of the Lua community, but that’s okay.

The Command Prompt’s killer misfeature is it’s antiquated inability to handle Unicode properly. It limits the fonts you can use (see Raymond Chen’s Why are console windows limited to Lucida Console and raster fonts?). Your program might output the right things, but it you can’t see it in the console, what good is that console?

command_prompt

Powershell

Powershell is a command interpreter on steroids. It’s a decent shell and it really shines when you want to do Windows-specific things since you can pipe objects between commands. It’s also a bit nicer than Command Prompt.

Powershell has a history mechanism so I can easily recall and replay commands, but I find it verbose and a bit klutzy since it’s built on top of .NET and is a consequence of that. I can get around with alias.

Powershell also suffers from the same Unicode problems as the Command Prompt, for the same reasons.

powershell

Third-party programs

Some third-party apps are fancier window dressing around the command interpreters that already exist, and some add features in addition to them. The applications that wrap the Command Prompt have all the same problems.

ConEmu

The ConEmu has tabs, each of which can run a different command shell. I can run a Command Prompt in one tab, Powershell in another, and some other shell in a third. It provides the window but the command interpreters stay the same.

Selecting text is a problem, so I don’t like this one either.

conemu

conemu-new-tab

Console2

Console 2 has tabs, but they are all Command Prompts. It’s copy feature requires that I hold down the shift key to make a selection. That works, but it’s really annoying and sends this one to the bottom the list for me.

console2

PowerCmd

PowerCMD has tabs, but it also lets me see more than one tab at a time and in a multitude of configurations.

powercmd

FireCMD

FireCMD has a free 30-day trial. It has a command interpreter, but includes a terminal emulator, text editor, and many more things. It aims to add a “Unix-like environment”, but it doesn’t quite get there. It’s its own shell that looks like a little of both.

firecmd-shell

firetext

Take Command

Take Command has a free 30 day trial. It extends the Command Prompt command set and works with its own IDE.

Win-bash

If you like bash, then Win-bash might be what you want. Some people mistake this for Unix, but how the operating system works and how you interact with it are different things. I can use bash commands (not “unix commands”!). I find it annoying in the slightly odd ways where it’s not exactly like bash. Like the Command Prompt, it limits the available fonts, making it unsuitable for development with Unicode. It also can’t make wide windows.

win_bash
Leave a comment

5 Comments.

  1. You left out the most important feature: resizability. If you see call stacks, etc in a locked 80 character terminal you have to waste a lot of mental effort putting lines back together.

  2. I’ve only just scratched the surface myself since I primarily use linux. Just thought the big flaw in cmd.exe could use a mention.

  3. Actually you can change the width and height of the command prompt.

    Press Alt-Space, or right click on the title bar.

    Press P or select Properties.

    Click on the Layout tab.

    From there you can change the various settings to your liking.

    ( I’m fairly confident that the code for it has roots in Windows 95 or even earlier, which would go a long way to explaining it’s short-comings )

    • You’re right! I can change the maximum width in Properties. It’s odd that the window can grow in one direction but only shrink in the other.

Leave a Reply

Your email address will not be published. Required fields are marked *