Autocompletion in the MySQL command-line client
In Linux, and many other systems, when navigating the terminal you can press Tab to auto complete a directory or file name.
I'm wondering if there is anything like that in the MySQL terminal. For example, if I want to get the description of someTableWithRidiculousLongName
I could type describe someTableW
then Tab and it would auto-complete the rest.
Does anything like that exist in the MySQL terminal?
Edit or create a file called .my.cnf
in your home directory, containing:
[mysql]
auto-rehash
To enable autocomplete within the MySQL prompt type:
mysql> \#
After that you can type:
mysql> describe someTableW[TAB]
To get:
mysql> describe someTableWithRidiculousLongName