Use ctrl + w to delete a word with MySQL Cli

By default, and while you’re using mysql CLI the combination ctrl + w delete the enter line, so if you type a long query and you want to delete the word before the cursor the combination ctrl + w will not work and you have to use the backspace instead, and the only configuration to solve this problem is by creating the file ~/.editrc if it doesn’t exist and add this line of code:

bind "^W" ed-delete-prev-word

Leave a Reply

Your email address will not be published. Required fields are marked *