It's always been frustrating to me that sqlplus
does not have REPL behavior, so you can't arrow-up through your history, etc. In addition, the default SQL prompt is not very informative. Since I often work on prod and dev databases at the same time, it is important to me that I know where I am when I am executing disastrous SQL.
Well, rlwrap
to the rescue! Plus, a handy login.sql script to customize your sqlplus
prompt. The package was available by default in RHEL6 and on OSX El Capitan. YMMV...
You'll need to do three small things, and you are good to go,