I came across a neat little tool called [rlwrap](http://utopia.knoware.nl/~hlub/rlwrap/), which essentially wraps the functionality of [readline](http://tiswww.case.edu/php/chet/readline/rltop.html) (line editing, history, etc) for any other command line utility. For example, it works well with my [GCCalc](http://tlrobinson.net/blog/?p=31) hack, which I didn’t bother to integrate readline into, but rlwrap gives you the same thing for free:
rlwrap gccalc
It’s useful with many other tools, like telnet and netcat, and interactive interpreters that don’t have line editing or history, like [Rhino](http://www.mozilla.org/rhino/) (Javascript) and others.