Open HolaYang opened 7 years ago
@Takeoffyoung Hello! Here a few things to check:
connect
and make sure that it says ...connected to database "{database name}"...
. Mycli will autocomplete table names from whatever the current default database is (set via the use
command`).select a
is not going to autcomplete all the columns with a
in it. You'd have to do select [a] from table1;
where you type the from part and then back track to the column part of the select statement.\#
It works well after add -D {database name} to command.
But I cannot find any tips like "specifying database is precondition of enabling auto-complete".
Polishing README maybe matter.
Thanks 👍
@Takeoffyoung I'm glad you figured it out. We're happy to help out if you come across anything else.
We actually do mention this in our documentation:
Only table names from the current database are suggested after the FROM keyword.
The document should clear that using USE {database name}
does not work but specifying it via appending -D {database name}
to startup command does.
No matter if it is after FROM
keyword.
@Takeoffyoung Both USE
and -D
should work for setting the current database that is used for suggesting completions. If it doesn't, then there might be an issue we should look into. That's how it currently works on mycli when I test it.
Any way to diagnose why mycli can not auto complete on any field names or table names?
Mysql version:
~/.myclirc