'rman' cheat-sheet and rlwrap completion

I started using 'rlwrap' some monthes ago like one of my colleague does.

bash-like features in sqlplus, rman and other Oracle command line tools (Oracle Luxembourg Core Tech' Blog by Gilles Haro)

One can find specific Oracle extension for databases 9i, 10g and 11g (keyword textfile) over here.
This will avoid you the need to create this .oracle_keywords file.

There is 'rman' keyword file in the link above.
I experimented a little and found some missing keywords which are:

MAXCORRUPTION PRIMARY NOCFAU VIRTUAL COMPRESSION FOREIGN

With these words added, 'rman' works like this:

$ rlwrap -f ~/rman $ORACLE_HOME/bin/rman
Recovery Manager: Release 11.2.0.3.0 - Production on Mon Dec 3 02:56:04 2012
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
RMAN>  <-- Hit TAB
Display all 211 possibilities? (y or n)

As you can guess, this completion is not context aware.

I found these missing words by creating a kind of 'cheat sheet' for rman with the script like below.
This sheet contains list of verbs and 1st operands.
I uploaded to here so one can create a coffee cup with a lot of esoteric words printed on :)

validWords() {
  sed -n 's/^RMAN-01009: syntax error: found "identifier": expecting one of: //p' \
  | sed -r 's/double-quoted-string, single-quoted-string/Some String/;s/, /" "/g;s/""//'
}
echo "Bogus" | rman | validWords > /tmp/rman.$$
for i in $(cat /tmp/rman.$$)
do
  i=$(echo $i | tr -d '"')
  echo "#### $i ####"
  echo "$i Bogus" | rman | validWords
done

One can find more keywords in the document here.

Comments:

Hello - it seems there is a problem getting the keyword extension...
would you be able to upload on your website so i can get a copy of it?

Thx,
Dani

Posted by DanyC on December 05, 2012 at 09:17 AM JST #

I think it's down temporarily

Posted by me on December 05, 2012 at 09:42 AM JST #

Unfortunately, so you don't have a copy which you can share/ upload?

Posted by DanyC on December 06, 2012 at 09:11 AM JST #

I just e-mailed the author

Posted by me on December 07, 2012 at 09:08 AM JST #

Hi! Sorry for the "slightly" delayed answer :-) I am the owner of linuxification where the keyword list is stored. I updated it to reflect 11gr2 and tried to fix some of the flaws (there are for certain some left). Due to a provider change and other things I did not tend my website too good, I'm afraid. If the problems persist, just email me under j.gritsch@gmx.at
br Hannes

Posted by guest on June 03, 2013 at 07:59 PM JST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today