The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.
The library can be downloaded from the url:
and configured and installed with the usual isntructions:
./configure && make && make install
sudo yum install readline
sudo macports install readline