I have vi bindings working in my bash shell using set -o vi
in my .bash_profile. But I can't seem to get them to work in the mysql
command line client. I only get emacs style bindings. How do you do this?
I also put these lines in my .inputrc, but to with no effect:
set editing-mode vi set keymap vi
Launch the MySQL Command-Line Client. To launch the client, enter the following command in a Command Prompt window: mysql -u root -p . The -p option is needed only if a root password is defined for MySQL. Enter the password when prompted.
Tee is a unix command that takes the standard out output of a Unix command and writes it to both your terminal and a file.
Quick google reveals this... don't know if it helps.
Copied here for convenience:
Add the following on OS X 10.5:
$ cat .editrc bind -v
This will work for OS X 10.4 and other operating systems:
$ cat .inputrc set editing-mode vi
These two files worked on my previous workstation (not sure of the MySQL version (my old job)). I keep my dotFiles in git.
.editrc
bind -v bind \\t rl_complete
.inputrc (several of these may or may-not be needed)
set editing-mode vi set keymap vi set meta-flag on set input-meta on set convert-meta off set output-meta on set bell-style none
Posting these because I couldn't post them in my comment above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With