mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 22:33:08 +02:00
Parser
- ::getCommand should return the canonical form of the command, not the raw input.
This commit is contained in:
parent
e2aacb87f9
commit
904c42fcbe
2 changed files with 3 additions and 4 deletions
|
@ -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 "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue