I am using the msyql-client, and I open a mysql prompt on a terminal via:
$ mysql -h localhost -uuser -ppassword
mysql>
I use the msql client version:
Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
For terminals with emacs-like bindings, I have a very strong muscle memory to use
Ctrl + W
to delete the last word. Yet inside the mysql client, it deletes back to the start of the line and hence it's hard for me to write or adapt queries.
Can I rebind the keyboard shortcuts for mysql client and, if so, how? I know that I can use Alt + Backspace instead, yet I want to keep my usage consistent.
Ctrl-w
is areadline
function, it should work the same in allreadline
-enabled applications. If it doesn't work inmysql
then yourmysql
might be compiled without it. You can check withmysql --version
(it should say something like "... using readline 5.1").mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper
; I guess "EditLine" is not the same as "ReadLine"?readline
, thus the difference withCtrl-w
. No idea if / how it can be configured to do what you want. shrug