2008-03-30

Command history in Oracle sqlplus: adding readline support at runtime

Readline-style editing (arrow keys, word deletion, command history, etc.) is a feature that most users expect out of a command-line application on Linux. And one that is painfully missing from Oracle sqlplus (the equivalent to psql).

Of course, Debian has a solution:
apt-get install rlwrap
rlwrap sqlplus

You may also find it useful if, for some reason, you need to use the dash shell interactively.

3 comments:

Jason Pollock said...

Interesting. There is also gqlplus, which has that, and some tab-completion for table/column names.

Andrew Chilton said...

I use sql++ which helps with a lot of things too.

i_am_gravious said...

Thanks. Super stuff. Works on Ubuntu Hardy nicely. Now all I have to do is get the formatting done sweet.