bcli provides support for using the arrow keys for command-line
editing. Up and Down arrows will cycle through the command history,
and Left & Right can be used for editing the current command line.
libcli also works out the shortest way of entering a command, so if
you have a command "show users grep foobar" defined, you can enter
"sh us g foobar" if that is the shortest possible way of doing it.
https://github.com/dparrish/libcli