arrow keys are not functional in sqlplus

后端 未结 2 552
醉酒成梦
醉酒成梦 2021-02-01 01:54

I find that the arrow keys don\'t work on the sqlplus console. For example if I press left arrow key, it shows like

SQL>^[[B

Does any soluti

2条回答
  •  我在风中等你
    2021-02-01 02:19

    You can use a third party utility called rlwrap.

    rlwrap is a readline wrapper, a small utility that uses the GNU readline library to allow the editing of keyboard input for any other command. It maintains a separate input history for each command, and can TAB-expand words using all previously seen words and/or a user-specified file.

    So you will be able to use arrows and also get a command history as a bonus.

    After you have installed the utility run sqlplus the following way:

    $ rlwrap sqlplus
    

提交回复
热议问题