Aug 21

Mashing up some GUI with your ancient command line

Bespin, Tech with tags: 6 Comments »

Mitcho has put together a killer tool, The Ubiquity Persistence Project, that lets you tweak the look and feel of Ubiquity on the fly in order to prototype it:

This reminded me of a topic that I have been mulling around in my head. With Bespin we spend time thinking about how text editors have innovated in little ways (and important ones: code completion etc) over recent years. We want to speed that up, hence the social features.

One part of Bespin is the command line which is a core part of the experience and continues to grow in its role. The goal has always been to merge the Bespin command line with Ubiquity in some way, and people have played with that idea since we modeled our commands to be similar to Ubiquity’s.

Since our command line is in HTML and not on a terminal, we had different ways of helping the user do what they want to do. Take the UNIX command line for example, what has changed there?

  • A shell created the notion of “completion”: first for files/dirs, and then to now where you can do super smart completion
  • At some point we got colors (LS_COLORS and the like). Woohoo!
  • Keyboard shortcuts get us to move around our history nicely

Useful things, but nothing compared to what you can do if you have more than text. We ended up following a pattern where, if you don’t put in the right command line parameters, you get prompted. This isn’t the same as having the command program itself ask you, as you can declare it in the command and the prompt can be as rich as you want. For example, here is the vcs clone command. In theory we could make the command take a bunch of options: vcs clone --url --project myproj --username user --password pass ... or we could ask for it (and allow browser history to kick in and help):


This is a touch crude, but shows you where we are going. I want to be able to declare the types and names of values that a command needs, and have a UI help the user out. As you are typing the command a popup can appear showing you the items that you have to complete, and those that are optional, and help you fill them in with values that make sense.

In fact, although it will be great to make the Bespin command line awesome, it makes me whimper when I am back to good ole Can’t we mash that up too?


Time for Commandline 2.0! It would be awesome to have an incredibly rich version of that helps you in amazing ways. As the Web becomes the platform, that may just happen via Ubiquity itself :)