Enhancement - _commands

- Added undocumented _commands command to support completion scripts.
This commit is contained in:
Paul Beckingham
2009-07-04 00:35:50 -04:00
parent a6e9e6cdfb
commit f633e42597
5 changed files with 28 additions and 0 deletions

View File

@@ -315,6 +315,20 @@ std::string handleCompletionTags ()
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
std::string handleCompletionCommands ()
{
std::vector <std::string> commands;
context.cmd.allCommands (commands);
std::sort (commands.begin (), commands.end ());
std::stringstream out;
foreach (command, commands)
out << *command << std::endl;
return out.str ();
}
////////////////////////////////////////////////////////////////////////////////
void handleUndo ()
{