mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-21 07:43:08 +02:00
Command - show
- Fixed the show command to accept 'all' or a substring to search for in the configuration file.
This commit is contained in:
parent
9275f3460f
commit
76760fe434
2 changed files with 12 additions and 8 deletions
|
@ -297,12 +297,14 @@ void E9::operator_lt (Term& result, Term& left, Term& right)
|
||||||
|
|
||||||
result._category = "bool";
|
result._category = "bool";
|
||||||
|
|
||||||
|
/*
|
||||||
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
||||||
<< " < "
|
<< " < "
|
||||||
<< right._raw << "/" << right._value << "/" << right._category
|
<< right._raw << "/" << right._value << "/" << right._category
|
||||||
<< " --> "
|
<< " --> "
|
||||||
<< result._raw << "/" << result._value << "/" << result._category
|
<< result._raw << "/" << result._value << "/" << result._category
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -326,12 +328,14 @@ void E9::operator_lte (Term& result, Term& left, Term& right)
|
||||||
|
|
||||||
result._category = "bool";
|
result._category = "bool";
|
||||||
|
|
||||||
|
/*
|
||||||
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
||||||
<< " <= "
|
<< " <= "
|
||||||
<< right._raw << "/" << right._value << "/" << right._category
|
<< right._raw << "/" << right._value << "/" << right._category
|
||||||
<< " --> "
|
<< " --> "
|
||||||
<< result._raw << "/" << result._value << "/" << result._category
|
<< result._raw << "/" << result._value << "/" << result._category
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -355,12 +359,14 @@ void E9::operator_gte (Term& result, Term& left, Term& right)
|
||||||
|
|
||||||
result._category = "bool";
|
result._category = "bool";
|
||||||
|
|
||||||
|
/*
|
||||||
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
||||||
<< " >= "
|
<< " >= "
|
||||||
<< right._raw << "/" << right._value << "/" << right._category
|
<< right._raw << "/" << right._value << "/" << right._category
|
||||||
<< " --> "
|
<< " --> "
|
||||||
<< result._raw << "/" << result._value << "/" << result._category
|
<< result._raw << "/" << result._value << "/" << result._category
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -383,12 +389,14 @@ void E9::operator_gt (Term& result, Term& left, Term& right)
|
||||||
|
|
||||||
result._category = "bool";
|
result._category = "bool";
|
||||||
|
|
||||||
|
/*
|
||||||
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
std::cout << "# " << left._raw << "/" << left._value << "/" << left._category
|
||||||
<< " > "
|
<< " > "
|
||||||
<< right._raw << "/" << right._value << "/" << right._category
|
<< right._raw << "/" << right._value << "/" << right._category
|
||||||
<< " --> "
|
<< " --> "
|
||||||
<< result._raw << "/" << result._value << "/" << result._category
|
<< result._raw << "/" << result._value << "/" << result._category
|
||||||
<< "\n";
|
<< "\n";
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -57,7 +57,8 @@ int CmdShow::execute (std::string& output)
|
||||||
|
|
||||||
// Obtain the arguments from the description. That way, things like '--'
|
// Obtain the arguments from the description. That way, things like '--'
|
||||||
// have already been handled.
|
// have already been handled.
|
||||||
if (context.a3.size () > 2)
|
std::vector <std::string> words = context.a3.extract_words ();
|
||||||
|
if (words.size () > 2)
|
||||||
throw std::string (STRING_CMD_SHOW_ARGS);
|
throw std::string (STRING_CMD_SHOW_ARGS);
|
||||||
|
|
||||||
int width = context.getWidth ();
|
int width = context.getWidth ();
|
||||||
|
@ -264,13 +265,8 @@ int CmdShow::execute (std::string& output)
|
||||||
std::string section;
|
std::string section;
|
||||||
|
|
||||||
// Look for the first plausible argument which could be a pattern
|
// Look for the first plausible argument which could be a pattern
|
||||||
// TODO Replace this 'section' assessment with something that scans the
|
if (words.size ())
|
||||||
// arguments and pulls out either <word> or <pattern> strings to use as
|
section = words[0];
|
||||||
// search items.
|
|
||||||
/*
|
|
||||||
if (context.args.size () == 2)
|
|
||||||
section = context.args[1];
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (section == "all")
|
if (section == "all")
|
||||||
section = "";
|
section = "";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue