Open mytskine opened 3 years ago
I've noticed some other inconsistencies.
It seems like mycli tries to be smart about when a completion could be only an sql keyword or a column, and will only show completions for one type. For example, SELECT COUNT(
seems to assume that only a column name will work here, so no completion for DISTINCT
. Seems like it would be better to not be so "smart", and always show both sql keywords and column names.
Another strange one is that sometimes mycli will only show the completion for an exact match, even if there are other available completions. For example, I have a table called requirement
with column called is_active
. When I do this:
SELECT is FROM requirement
, with the cursor after the is
I see completions for both is_active
and IS
. However, here:
SELECT * FROM requirement WHERE is
the completion for is
only shows IS
. Why show only the exact match in the second case?
I've also come across situations where I get no completion choices at all, even though there should be some.
What is the current behavior:
select * from use
, the first suggestion isuser_devices
and the 11th isuser
(with backticks for this one), then other tables likechat_users
, and much later come sparse completions likesurvey_answers
.select * from cou
, the first suggestion iscourse
, then other tables likecourse_categories
, laterenrol_lti_lti2_consumer
, thenbackup_courses
.select * from _cons
, there is no exact match in the near 20 suggestions. I need to add an extra letter (_consu
) to find the exact matchenrol_lti_lti2_consumer
.What I expected:
user
should have been the first result, just likecourse
was the first result to 2. Backticks should not interfere in the sorting.backup_courses
should precedeenrol_lti_lti2_consumer
(wherecou
is not present). In 3, the exact matches could only be found through scrolling, which is not the expected behavior.Other grieves (I won't create an issue for each one, feel free to do so):
Cou
should matchCourse
but notdiscourse
.