MySQL reverse-i-search

前端 未结 1 1250
小蘑菇
小蘑菇 2021-01-17 17:25

In mysql client (command line), I used to be able to press Ctrl+R to do a reverse incremental search, similarly you can do that in linux console. For some reason this does n

1条回答
  •  隐瞒了意图╮
    2021-01-17 17:53

    MySQL 5.6 is built with the editline library, instead of the readline library used in earlier releases of MySQL. So the default key bindings might be a little bit different than you are used to.

    Ctrl+R should still be bound to em-inc-search-prev by default. It works fine in my environment.

    See also: Bug #60465 MySQL-5.5 readline (editline) -- CTRL-R does not work

    The key binding can be set via the ~/.editrc file by adding the following line: "bind "^R" em-inc-search-prev". See man editrc for more details.

    And make sure your version of MySQL is not affected by Bug #49967 built-in libedit doesn't read .editrc on linux

    If you want to see the current editline key bindings, temporarily add this line to the end of your $HOME/.editrc:

    bind
    

    Then start the mysql client. It will output the full set of key bindings currently recognized.

    0 讨论(0)
提交回复
热议问题