Parser
- ::getCommand should return the canonical form of the command, not the raw input.
This commit is contained in:
@@ -385,7 +385,6 @@ int Context::dispatch (std::string &out)
|
|||||||
if (command != "")
|
if (command != "")
|
||||||
{
|
{
|
||||||
updateXtermTitle ();
|
updateXtermTitle ();
|
||||||
|
|
||||||
updateVerbosity ();
|
updateVerbosity ();
|
||||||
|
|
||||||
Command* c = commands[command];
|
Command* c = commands[command];
|
||||||
|
|||||||
@@ -595,7 +595,7 @@ std::string Parser::getLimit () const
|
|||||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||||
{
|
{
|
||||||
// Parser override operator.
|
// Parser override operator.
|
||||||
if ((*i)->attribute ("raw") == "TERMINATED")
|
if ((*i)->attribute ("raw") == "--")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((*i)->hasTag ("PSEUDO") &&
|
if ((*i)->hasTag ("PSEUDO") &&
|
||||||
@@ -615,11 +615,11 @@ std::string Parser::getCommand () const
|
|||||||
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
|
||||||
{
|
{
|
||||||
// Parser override operator.
|
// Parser override operator.
|
||||||
if ((*i)->attribute ("canonical") == "TERMINATED")
|
if ((*i)->attribute ("raw") == "--")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if ((*i)->hasTag ("CMD"))
|
if ((*i)->hasTag ("CMD"))
|
||||||
return (*i)->attribute ("raw");
|
return (*i)->attribute ("canonical");
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
Reference in New Issue
Block a user