mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Context: Now obeys command DNA
- Applying a context filter is now performed only when a command requests it.
This commit is contained in:
parent
8d5a60a2a2
commit
758df84539
6 changed files with 14 additions and 11 deletions
|
@ -601,13 +601,16 @@ void CLI2::addContextFilter ()
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Parse the command line, identifiying filter components, expanding syntactic
|
||||
// sugar as necessary.
|
||||
void CLI2::prepareFilter (bool applyContext)
|
||||
void CLI2::prepareFilter ()
|
||||
{
|
||||
// Clear and re-populate.
|
||||
_id_ranges.clear ();
|
||||
_uuid_list.clear ();
|
||||
|
||||
if (applyContext)
|
||||
// Context is only applied for commands that request it.
|
||||
std::string command = getCommand ();
|
||||
Command* cmd = context.commands[command];
|
||||
if (cmd && cmd->uses_context ())
|
||||
addContextFilter ();
|
||||
|
||||
// Classify FILTER and MODIFICATION args, based on CMD and READCMD/WRITECMD.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue