- ::getCommand should return the canonical form of the command, not the raw
  input.
This commit is contained in:
Paul Beckingham 2014-05-25 22:45:00 -04:00
parent e2aacb87f9
commit 904c42fcbe
2 changed files with 3 additions and 4 deletions

View file

@ -385,7 +385,6 @@ int Context::dispatch (std::string &out)
if (command != "")
{
updateXtermTitle ();
updateVerbosity ();
Command* c = commands[command];

View file

@ -595,7 +595,7 @@ std::string Parser::getLimit () const
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{
// Parser override operator.
if ((*i)->attribute ("raw") == "TERMINATED")
if ((*i)->attribute ("raw") == "--")
break;
if ((*i)->hasTag ("PSEUDO") &&
@ -615,11 +615,11 @@ std::string Parser::getCommand () const
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{
// Parser override operator.
if ((*i)->attribute ("canonical") == "TERMINATED")
if ((*i)->attribute ("raw") == "--")
break;
if ((*i)->hasTag ("CMD"))
return (*i)->attribute ("raw");
return (*i)->attribute ("canonical");
}
return "";