commander: sort options for completion

This commit is contained in:
Aldo Cortesi 2017-12-15 16:26:33 +13:00
parent a8ae006f2e
commit 1d2cdcff07

View File

@ -27,6 +27,7 @@ class ListCompleter(Completer):
for o in options: for o in options:
if o.startswith(start): if o.startswith(start):
self.options.append(o) self.options.append(o)
self.options.sort()
self.offset = 0 self.offset = 0
def cycle(self) -> str: def cycle(self) -> str: