Bug 445 - The command 'task h' should be ambiguous, yet works

- Fixed bug #445, which caused task to not notice that the command 'h' is
  ambiguous.  This was caused by mistakenly first autoCompleting against
  a set of alias names, during canonicalization, instead of autoCompleting
  against the whole set of possible commands and aliases, then doing the
  canonicalization.  The order was reversed.
- Also populated list of all commands with alias names, so the above
  could be corrected.
This commit is contained in:
Paul Beckingham
2010-07-28 17:50:47 -04:00
parent e886f7635b
commit 3952765de0
3 changed files with 88 additions and 66 deletions

View File

@@ -475,10 +475,6 @@ int handleCompletionCommands (std::string &outs)
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 ());