- 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:
Paul Beckingham 2010-05-31 11:40:42 -04:00
parent 24085e0960
commit 8cd8c4753b
3 changed files with 10 additions and 0 deletions

View file

@ -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;