mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
CLI2: Removed obsolete ::decomposeModSubstitutions
This commit is contained in:
parent
af71af1085
commit
023fd9d38a
2 changed files with 0 additions and 33 deletions
32
src/CLI2.cpp
32
src/CLI2.cpp
|
@ -636,9 +636,6 @@ void CLI2::prepareFilter (bool applyContext)
|
|||
desugarFilterAttributes ();
|
||||
desugarFilterPatterns ();
|
||||
insertJunctions (); // Deliberately after all desugar calls.
|
||||
|
||||
// Decompose the elements for MODIFICATIONs.
|
||||
//decomposeModSubstitutions ();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -1697,32 +1694,3 @@ void CLI2::defaultCommand ()
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void CLI2::decomposeModSubstitutions ()
|
||||
{
|
||||
bool changes = false;
|
||||
for (auto& a : _args)
|
||||
{
|
||||
if (a._lextype == Lexer::Type::substitution &&
|
||||
a.hasTag ("MODIFICATION"))
|
||||
{
|
||||
std::string raw = a.attribute ("raw");
|
||||
if (! Directory (raw).exists ())
|
||||
{
|
||||
auto slash1 = raw.find ("/");
|
||||
auto slash2 = raw.find ("/", slash1 + 1);
|
||||
auto slash3 = raw.find ("/", slash2 + 1);
|
||||
|
||||
a.attribute ("from", raw.substr (slash1 + 1, slash2 - slash1 - 1));
|
||||
a.attribute ("to", raw.substr (slash2 + 1, slash3 - slash2 - 1));
|
||||
a.attribute ("global", raw.substr (slash3 + 1) == "g" ? 1 : 0);
|
||||
changes = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (changes &&
|
||||
context.config.getInteger ("debug.parser") >= 3)
|
||||
context.debug (dump ("CLI2::prepareFilter decomposeModSubstitutions"));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue