1

I've got tab completion working for tables and columns (--auto-rehash), is there any way to also have tab completion for SQL commands eg

SE (tab) --> SELECT
SELECT * FR (tab) --> SELECT * FROM
3
  • stackoverflow question?
    – ricbax
    Oct 6 '10 at 2:52
  • I'm not sure what your interface is. Is this some kind of MySQL client software, or the command line perhaps?
    – NReilingh
    Oct 6 '10 at 3:20
  • Looks like the stock mysql client program to me. Oct 6 '10 at 4:11
1

You're probably talking about mysql command-line client.

For a single session, you can enable tab completion with command line switch --auto-rehash .

To set this behavior default, check your mysql configuration file my.cnf, find [mysql] region, and replace line

no-auto-rehash

with

auto-rehash
3
  • ahh, SQL commands must be typed in caps for autocompletion to work
    – cerberos
    Nov 28 '12 at 11:59
  • 1
    Not working for me. Something to do with vi key binding? Aug 24 '15 at 7:58
  • 1
    @FrozenFlame: I found the solution to this problem (which was what I was looking for when I found this answer) on Stack Overflow stackoverflow.com/questions/2216471/…
    – adam_0
    May 5 '16 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.