diff --git a/ChangeLog b/ChangeLog index 32076034e..aad6296dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,8 @@ by using the 'log' command in place of 'add' (thanks to Cory Donnelly). + Added features #36 and #37, providing annual versions of the 'history' and 'ghistory' command as 'history.annual' and 'ghistory.annual'. + + Fixed bug #406 so that task now includes command aliases in the _commands + helper command used by shell completion scripts. ------ old releases ------------------------------ diff --git a/NEWS b/NEWS index 40f6ee282..9322a0643 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,7 @@ New Features in task 1.9 substitutions in the description and annotations. - New 'log' command to add tasks that are already completed. - New annual history and ghistory command variations. + - Alias support in shell completion scripts. - Task is now part of Debian Please refer to the ChangeLog file for full details. There are too many to diff --git a/src/command.cpp b/src/command.cpp index b97b6044e..ea9bf7274 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -424,8 +424,15 @@ int handleCompletionTags (std::string &outs) //////////////////////////////////////////////////////////////////////////////// int handleCompletionCommands (std::string &outs) { + // Get a list of all commands. std::vector commands; context.cmd.allCommands (commands); + + // Concatenate a list of all aliases. + foreach (name, context.aliases) + commands.push_back (name->first); + + // Sort alphabetically. std::sort (commands.begin (), commands.end ()); std::stringstream out;