However there is a utility called rlwrap that can help us fix this problem. rlwrap is a readline wrapper for shell commands which uses input from the controlling terminal. It adds a persistent input history for each command and supports user-defined completion.
Here are the steps to install rlwrap on Mac OS X:
1. Download Macports from http://darwinports.com/ (If you don't have it already)
2. Install macports.
3. Update macports. Go to /opt/local/bin and type the following:
sudo ./port -d selfupdate |
4. Install rlwrap with the following command (You will see it will install some dependencies too):
sudo ./port install rlwrap |
5. Add the following line to your .bash_profile:
alias sqlplus='/opt/local/bin/rlwrap sqlplus' |
6. Launch SQL*plus as usual and use rlwrap to access your sql history!
No comments:
Post a Comment