From a4807a48b076cde49c29a25bc120e0b4d36f0307 Mon Sep 17 00:00:00 2001 From: Amjith Ramanujam Date: Wed, 6 Nov 2024 22:33:32 -0800 Subject: [PATCH] Enable fuzzy matching for keywords. --- mycli/sqlcompleter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mycli/sqlcompleter.py b/mycli/sqlcompleter.py index 17363f48..b0eecea8 100644 --- a/mycli/sqlcompleter.py +++ b/mycli/sqlcompleter.py @@ -475,8 +475,6 @@ def get_completions(self, document, complete_event, smart_completion=None): elif suggestion['type'] == 'keyword': keywords = self.find_matches(word_before_cursor, self.keywords, - start_only=True, - fuzzy=False, casing=self.keyword_casing) completions.extend(keywords) @@ -513,8 +511,8 @@ def get_completions(self, document, complete_event, smart_completion=None): completions.extend(queries) elif suggestion['type'] == 'table_format': formats = self.find_matches(word_before_cursor, - self.table_formats, - start_only=True, fuzzy=False) + self.table_formats) + completions.extend(formats) elif suggestion['type'] == 'file_name': file_names = self.find_files(word_before_cursor)