Use rlwrap to wrap command line apps with readline
wraps any command line utility with the GNU readline
library, which gives you history and Emacs-style keyboard commands for line editing that you'd get with anything that uses the readline library (such as the Bash shell).
I started using it with Oracle's SQL*Plus
command-line utility which lacks history and decent editing capabilities. rlwrap makes it much more pleasant to use.
There is a package for rlwrap in Ubuntu 9.04, so it is likely to be in other recent Linux distros. If you're on Mac OS X, Fink
has a package for this. If you're on Windows, it looks like
there is a package for Cygwin