1
0
mirror of https://github.com/dbcli/pgcli synced 2024-06-24 02:03:20 +00:00

Make completion menu sorted.

This commit is contained in:
Amjith Ramanujam 2015-01-31 15:12:05 -08:00
parent 588be27797
commit a31053aa1f

View File

@ -122,7 +122,7 @@ class PGCompleter(Completer):
@staticmethod
def find_matches(text, collection):
text = last_word(text, include='most_punctuations')
for item in collection:
for item in sorted(collection):
if (item.startswith(text) or item.startswith(text.upper()) or
item.startswith(text.lower())):
yield Completion(item, -len(text))