Last active
December 28, 2015 20:28
-
-
Save gyk001/7557096 to your computer and use it in GitHub Desktop.
Linux下SQLPlus支持历史记录的工具rlwrap
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@centos]~# yum install readline readline-devel | |
[root@centos]~# wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz | |
[root@centos]~# tar -xzvf rlwrap-0.37.tar.gz | |
[root@centos]~# cd rlwrap-0.37 | |
[root@centos]~/rlwrap-0.37# ./configure | |
[root@centos]~/rlwrap-0.37# make && make install | |
[root@centos]~/rlwrap-0.37# #测试一下,有如下输出说明安装成功 | |
[root@centos]~/rlwrap-0.37# /usr/local/bin/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/ | |
[root@centos]~/rlwrap-0.37# | |
[oracle@centos ~]$ alias sqlplus='/usr/local/bin/rlwrap sqlplus' | |
[oracle@centos ~]$ sqlplus /nolog | |
SQL*Plus: Release 11.2.0.1.0 Production on Wed Nov 20 09:52:40 2013 | |
Copyright (c) 1982, 2009, Oracle. All rights reserved. | |
SQL> conn / as sysdba | |
Connected to an idle instance. | |
SQL> <上下键/左右键/各种键开始readline之旅吧..> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment