The prompt function has one level of history.

  Thanks to a replacement readline implementation shamelessly
 taken from this post:

    http://stackoverflow.com/questions/5073045/ncurses-getstr-with-a-movable-cursor

  It is a step in the right direction, but we need to use readline,
 or something similar.  That way we'd get proper history and the
 ability to use Ctrl-a, Ctrl-e, etc.