Bug fix - #406
- Fixed bug #406 so that task now includes command aliases in the _commands helper command used by shell completion scripts.
This commit is contained in:
@@ -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 ------------------------------
|
||||
|
||||
|
||||
1
NEWS
1
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
|
||||
|
||||
@@ -424,8 +424,15 @@ int handleCompletionTags (std::string &outs)
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handleCompletionCommands (std::string &outs)
|
||||
{
|
||||
// Get a list of all commands.
|
||||
std::vector <std::string> 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;
|
||||
|
||||
Reference in New Issue
Block a user