Posts Tagged ‘rlwrap’

Command history in sqlplus using a linux shell: rlwrap

Saturday, April 10th, 2010

When using the Oracle sqlplus command on a Unix of Linux machine or when running Cygwin on a Windows machine, you will lack the use of the command history that you will have when you run sqlplus on a Windows machine.
You can solve this by installing a small utility and use this small utility to call sqlplus.

The program is called “rlwrap”. This is a read-line wrapper, and it allows the editing of keyboard input for any other command. It maintains a separate input history for each command, and can tab-expand words.

How to use it:

  • First download rlwrap and install it.
  • Then in your .bashrc file add an alias for sqlplus: alias sqlplus=’rlwrap sqlplus’
  • And on the command prompt you can now use sqlplus with a command history.