rlwrap is a 'readline wrapper' that uses the GNU readline library
to allow the editing of keyboard input for any other command. Input
history is remembered across invocations, separately for each command;
history completion and search work as in bash and completion word
lists can be specified on the command line.
If you wish to have history and completion files kept somewhere other
than $HOME, you will need to set RLWRAP_HOME to the desired path and
rlwrap will create it so long as all its parent directories exist.