使用rlwrap实现sqlplus上下键

 

[root@node2 oracle]# tar zxvf rlwrap-0.37.tar.gz

 

[root@node2 rlwrap-0.37]# ./configure && make && make install

 

第二步检验是否安装成功

 

[root@node2 rlwrap-0.37]# rlwrap

Usage: rlwrap [options] command ...

 

Options:

  -a[password:]              --always-readline[=password:]

  -A                         --ansi-colour-aware

  -b  <chars>                --break-chars=<chars>

  -c                         --complete-filenames

  -C  <name|N>               --command-name=<name|N>

  -D  <0|1|2>                --history-no-dupes=<0|1|2>

  -f  <completion list>      --file=<completion list>

  -g  <regexp>               --forget-matching=<regexp>

  -h                         --help

  -H  <file>                 --history-filename=<file>

  -i                         --case-insensitive

  -I                         --pass-sigint-as-sigterm

  -l  <file>                 --logfile=<file>

  -n                         --no-warnings

  -N                         --no-children

  -o                         --one-shot

  -O  <regexp>               --only-cook=<regexp>

  -p[colour]                 --prompt-colour[=colour]

  -P  <input>                --pre-given=<input>

  -q  <chars>                --quote-characters=<chars>

  -m[newline substitute]     --multi-line[=newline substitute]

  -r                         --remember

  -R                         --renice

  -v                         --version

  -s  <N>                    --histsize=<N> (negative: readonly)

  -S  <prompt>               --substitute-prompt=<prompt>

  -t  <name>                 --set-term-name=<name>

  -w  <N>                    --wait-before-prompt=<N> (msec, <0  : patient mode)

  -z  <filter command>       --filter=<filter command>

 

bug reports, suggestions, updates:

http://utopia.knoware.nl/~hlub/uck/rlwrap/

 

 

 

配置环境变量

 

[oracle@node2 ~]$ vi .bash_profile

 

 

 

stty erase ^h

alias sqlplus='rlwrap sqlplus'

alias rman='rlwrap rman'

 

 

 

此文件末尾增加如上三句

 

保存

 

[oracle@node2 ~]$ source .bash_profile

posted @ 2014-11-30 10:59  智能先行者  阅读(206)  评论(0编辑  收藏  举报