Commit bb9de101 authored by Jacek Sowiński's avatar Jacek Sowiński

Add aliases into completion in prompt mode

parent 4d1a376b
...@@ -30,7 +30,9 @@ from topydo.lib.RelativeDate import relative_date_to_date ...@@ -30,7 +30,9 @@ from topydo.lib.RelativeDate import relative_date_to_date
def _subcommands(p_word_before_cursor): def _subcommands(p_word_before_cursor):
""" Generator for subcommand name completion. """ """ Generator for subcommand name completion. """
subcommands = [sc for sc in sorted(_SUBCOMMAND_MAP.keys()) if sc_map = config().aliases()
sc_map.update(_SUBCOMMAND_MAP)
subcommands = [sc for sc in sorted(sc_map.keys()) if
sc.startswith(p_word_before_cursor)] sc.startswith(p_word_before_cursor)]
for command in subcommands: for command in subcommands:
yield Completion(command, -len(p_word_before_cursor)) yield Completion(command, -len(p_word_before_cursor))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment