rlwrap is a wrapper that uses the GNU readline library to allow the editing of keyboard input for any other command.
Input history is kept between invocations, separately for each command; history completion and search work as in bash and completion word lists can be specified on the command line.