My friend Matt Ess helped me configure the rlwrap wrapper utility to make
sqlplus less frustrating to use. I wanted to document the process for anyone else who wants sane keyboard editing inside
The Problem with
Out of the box,
sqlplus is quite frustrating to use because it doesn't have line editor functionality. This means that if you use your up and down arrow keys, for instance, you do not go through your input history (as in a terminal), but instead you see the escape character for the up/down arrows:
The Solution: rlwrap #
rlwrap is a 'readline wrapper', which allows for the editing of keyboard input for any command. It's quite simple to build and use.
Clone the project to your home directory.
cd ~ git clone https://github.com/hanslub42/rlwrap.git
Configure and build the project.
cd rlwrap autoreconf --install ./configure --prefix=$HOME make install
Now you've got better keyboard support for interacting with
sqlplus! Hopefully this makes working with it a little less frustrating (sorry, I haven't found a way to make SQL itself more enjoyable).
Again, shout out to my friend Matt for the awesome tip.