Unix Linux Command Line History Utility

rlwrap
uniread

btw, gqlplus provides oracle sqlplus liked command history functions.