sel and when pressing the tab key rlwrap completes it to SELECT.
Does not sound spectacular?
It isn't, anyway, but quite useful. That´s the way rlwrap can do completion on the following things:
To make it work, you have to follow those steps:
$ and # as word delimiters - which is wrong for SQL. So I wrote a script named sql+ to repair that. It is also in each package.
You can download my extensions for three Oracle Versions:
rlwrap-extensions for Oracle Version 11
All you have to do is: untar the package into /usr/local/share/rlwrapand put the script sql+ somewhere into your path, like /usr/local/bin. That's it.
I created rlwrap-extensions for Oracle version 9i, 10g and 11g. They differ only in view names / packages names etc in the keyword lists.
Since rlwrap does not care to which Oracle version it is talking to, it does not matter if you use rlwrap-extensions for a different Oracle Version.
But if you really want each Oracle version to have its own rlwrap-version knowing the *EXACT* keyword list, do the following:
Install each version of rlwrap-extensions in a separate directory and create an adapted version of the script sql+ (usually located in /usr/local/bin. Put each version of that script into the appropriate $ORACLE_HOME/bin. That's it.
When calling rman, asmcmd or adrcli (the latter being available only in 11g) with rlwrap, use the switch -i to force rlwrap into case-insensitive mode. Otherwise it might not find the keywords in the lists.
rlwrap -i asmcmd
or
rlwrap -i rman target ...