Recently, I lost several weeks worth of data. I’m not talking about code or documents, but something almost equally valuable to me. I lost several weeks of bash shell history. You see, I rely heavily on bash’s Ctrl-R feature to find previous commands. It’s an amazing feature; every time I’m watching another person use bash and actually manually type out something like
for the 20th time in a row instead of Ctrl-R con RET, I have to resist the urge to lean forward and hit Ctrl-R for them.
Bash was designed a long time ago to run on big high-uptime multiuser servers, so I accept that it isn’t proper Crash only software. The only time bash saves the history of commands you’ve typed is when the shell cleanly exits. It will happily run weeks at a time, and if your computer locks up, you accidentally hit Ctrl-Alt-Backspace, whatever…boom. All gone.
This was not the first time this has happened to me. However, I decided it would be the last. I considered downloading the bash source code. Thinking about it more though, I realized that bash probably had no notion of a mainloop where I could just g_timeout_add(7000, save_history). Then there were other considerations such as trying to do all this in a portable fashion, and the fact that I was somewhat annoyed at the time that my last hacking on GNU software was just seeing the light of day in the Emacs 22 pretests 5 years after writing it.
I’ve always been interested in shells (in the sense of primarily text-driven interfaces). I wrote a simple one for the Mugshot server that turned out to be surprisingly useful relative to how long it took me (a few hours) to write.
Did you know that GNOME Terminal is the #2 Linux application (almost certainly tied with bash if it was counted) according to Mugshot?
Anyways, I’ll stop rambling about the backstory here and get to the point.
Hotwire is my prototype of an interactive hybrid text/graphical shell for developers and sysadmins.
The developer wiki explains a lot more about what it is, so if you want to learn more you should click there first (if you read this far, you probably already did), then keep reading here.
Hotwire is definitely still in the prototype stage; there are bugs and things that could be better. You’re not going to rpm -e gnome-terminal today.
However, what I’ve concluded thus far is that not only is replacing the combination of terminal+shell+/usr/bin/ssh feasible, we can do a lot better.
At this point, you get another story. A few months ago I had Windows on my new laptop, and I decided to try using IE7. It had tabs, which I required. I wondered how usable it would be relative to Firefox. For a little while I used it, was surfing around, making tabs…and it seemed OK, except…there was something wrong with the URL bar. It actually took me a little bit to realize what it was – its completion doesn’t strip of ‘www.’ as a prefix (or something), and its ordering of completions seems to be alphabetical rather than Firefox’s by-recency.
Just like Ctrl-R in bash, I rely on Firefox’s intelligent URL completion in the address bar. I never use bookmarks. IE7 was just not usable for me because of this. I downloaded Firefox. Now of course there are other good reasons to use Firefox, but what really motivated me to click that download right then was the completion.
I like to think Hotwire has some small-scale but big-impact fixes like this. Now for you those fixes may not be the same as me. Personally, I love the fact that history is searched and displayed by default, but for you perhaps it’s the fact that the ‘rm’ command moves items to ~/.Trash instead of deleting them permanently (opening the door to an ‘undo’ command). Maybe for someone else who loves nautilus-open-terminal, it’s having some of the functionality of both in one window.
I could go on, but Hotwire is only just about a week and a half old, and it doesn’t yet have that many amazing features. But again, what really strikes me is how much potential there is. Being written in Python, it’s so easy to hack. If right now it doesn’t have that fix for the terminal/shell you always wanted to do, it’s probably really easy to add. It’s also a framework where we don’t have to care about backwards compatibility with considerations such as the output of the ‘ls’ command, what keybindings do, etc. It’s a canvas, on which we can sketch out and prototype interesting new ideas for a new developer/sysadmin shell.
If you’re interested in hacking, check out the Developer page, clone the source tree, and send patches/feedback to the Google group.