mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Parser
- Modified ::injectDefault to use Lexer::token_split instead of Lexer::word_split which allows stranger default commands. Not sure if this is necessary, but it seems like the right thing.
This commit is contained in:
parent
f4605a1bc7
commit
5ac3db3168
1 changed files with 2 additions and 1 deletions
|
@ -313,6 +313,7 @@ void Parser::findCommand ()
|
||||||
else if (exactMatch ("readcmd", command)) (*i)->tag ("READCMD");
|
else if (exactMatch ("readcmd", command)) (*i)->tag ("READCMD");
|
||||||
else if (exactMatch ("helper", command)) (*i)->tag ("HELPER");
|
else if (exactMatch ("helper", command)) (*i)->tag ("HELPER");
|
||||||
|
|
||||||
|
// Stop at the first command found.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -468,7 +469,7 @@ void Parser::injectDefaults ()
|
||||||
// because captureFirst inserts args immediately after the command, and
|
// because captureFirst inserts args immediately after the command, and
|
||||||
// so has the effect of reversing the list.
|
// so has the effect of reversing the list.
|
||||||
std::vector <std::string> args;
|
std::vector <std::string> args;
|
||||||
Lexer::word_split (args, defaultCommand);
|
Lexer::token_split (args, defaultCommand);
|
||||||
std::vector <std::string>::reverse_iterator r;
|
std::vector <std::string>::reverse_iterator r;
|
||||||
for (r = args.rbegin (); r != args.rend (); ++r)
|
for (r = args.rbegin (); r != args.rend (); ++r)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue