mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 07:57:20 +02:00
CLI2: ::lexArguments now uses ::readWord to expand escapes
This commit is contained in:
parent
b86c079ed5
commit
21be6862db
1 changed files with 19 additions and 4 deletions
23
src/CLI2.cpp
23
src/CLI2.cpp
|
@ -437,11 +437,26 @@ void CLI2::lexArguments ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
A2 unknown (_original_args[i], Lexer::Type::word);
|
std::string::size_type cursor = 0;
|
||||||
if (lex.wasQuoted (_original_args[i]))
|
std::string word;
|
||||||
unknown.tag ("QUOTED");
|
if (Lexer::readWord ("'" + _original_args[i] + "'", "'", cursor, word))
|
||||||
|
{
|
||||||
|
A2 unknown (word, Lexer::Type::word);
|
||||||
|
if (lex.wasQuoted (_original_args[i]))
|
||||||
|
unknown.tag ("QUOTED");
|
||||||
|
|
||||||
_args.push_back (unknown);
|
_args.push_back (unknown);
|
||||||
|
}
|
||||||
|
|
||||||
|
// This branch may have no use-case.
|
||||||
|
else
|
||||||
|
{
|
||||||
|
A2 unknown (_original_args[i], Lexer::Type::word);
|
||||||
|
if (lex.wasQuoted (_original_args[i]))
|
||||||
|
unknown.tag ("QUOTED");
|
||||||
|
|
||||||
|
_args.push_back (unknown);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue