1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-20 13:58:33 +00:00

Sort completion suggestions

This commit is contained in:
Bram Schoenmakers 2017-02-13 12:42:51 +01:00
parent 3f9d6367ec
commit 512bea701a

View file

@ -67,12 +67,12 @@ class CompleterBase(object):
def contexts(self, p_word):
completions = ['@' + context for context in self.todolist.contexts() if
context.startswith(p_word[1:])]
return completions
return sorted(completions)
def projects(self, p_word):
completions = ['+' + project for project in self.todolist.projects() if
project.startswith(p_word[1:])]
return completions
return sorted(completions)
def subcmds(self, p_word):
completions = [cmd for cmd in self._subcmds if