Coping with the OSS command line on Windows

Long time (23 years?) Windows user here.

I’m not leaving Windows anytime soon, for a variety of reasons.

But I do have a Macbook Air. Parallels lets me run the best apps, whether they are Mac apps or Windows apps, on one desktop. For example I’m writing this blog post using Windows Live Writer, the absolutely best blog authoring tool out there. It’s a Windows app but runs flawlessly on the Mac via Parallels.  It runs in a Window, has an icon on the Dock, etc…

I’ve found that doing OSS based development (you know, things like Git, Node.js, Ruby/Padrino, et’c…) simply work best on my Mac.  On Windows these things are a massive pain in the ass. But the other advantages of Windows outweigh this pain for the most part (I’m not a full time developer by any stretch).

Even worse, on the Mac I can easily integrate the native Mac command line stuff into my Windows development tools. It’s really common for me to be running Visual Studio 2010 in one Window, iTerm in another (zsh + oh-my-zsh!), and the Mac version of Sublime Text 2 in another. I can use iTerm for all the git, brew, blah, blah, blah command line stuff I need and alt-tab to/from VS2010 as needed.  Parallels makes the file system visible to both sides.

As you can see below I’m able to alt-tab between VS2010 (Win), Sublime Text 2 (Mac), and iTerm (Mac). Other than the Windows style toolbar on VS, it all feels pretty coherent.


On Windows, I can’t do the reverse.  I struggle to get msysgit and cygwin to work seemlessly with Windows apps.


Because the Windows command line ain’t Unix based and the stand-ins (MINGW32/msysgit and cygwin) are hacks on Windows. They are attempts to force Unix code to call into the Windows API at the application level. Because of this there’s an impedance mismatch between the OSS tools and the underlying OS. Not all tools are supported, and there’s weird behaviors.

I have made it all work. I can now do most everything I do on the MBA on my Windows workstation. Most of the command lines are the same too. And having Sublime Text 2 as my editor is just killer.

But I want it to be better.

So I have an idea:

Use virtualization to get a great Unix like command line on Windows, instead of trying to do it at the API level. 

This would require that:

  • Someone build a basic Linux distro with no GUI. Pre-configure it to use zsh as the shell with oh-my-zsh setup.
  • Host this distro in one of the OSS or free virtual machine packages, such as Oracle’s VirtualBox,
  • Build a VM extensions that
    • Maps the Windows (host) file system into the guest.  So that within the Linux command line I can do “subl .” and the Windows version of Sublime Text 2 will load the contents of the current directory.
    • Supports copy/paste (this already works well in VirtualBox).
    • Allows the command line windows to feel like a Windows app (but with the features of iTerm for the Mac!).

Seems possible to me…

Listen, it’s well known I hate using Linux. But that’s Linux as a workstation. If this thing existed I’d never have to deal with any of the crappy GUI stuff going into Linux today. Just good old zsh.

Is this a crazy idea? Does it already exist? Who’s up for building it?

© Charlie Kindel. All Rights Reserved.


Comment on this post

This site uses Akismet to reduce spam. Learn how your comment data is processed.