mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-06 17:37:21 +02:00
Bug Fixes - autofilter
- Auto filter now only creates a filter for read-only commands. - Fixed bug whereby ambiguities were reported twice: "could be one of a, b, a, b".
This commit is contained in:
parent
97d732e5f7
commit
027b343e49
3 changed files with 7 additions and 7 deletions
|
@ -259,7 +259,6 @@ bool Att::validNameValue (
|
||||||
|
|
||||||
std::string combined;
|
std::string combined;
|
||||||
join (combined, ", ", matches);
|
join (combined, ", ", matches);
|
||||||
error += combined;
|
|
||||||
|
|
||||||
throw error + combined;
|
throw error + combined;
|
||||||
}
|
}
|
||||||
|
|
|
@ -463,11 +463,12 @@ std::cout << "[1;31m# parse post-termination description '" << *arg << "'[0m"
|
||||||
if (descCandidate != "" && noVerticalSpace (descCandidate))
|
if (descCandidate != "" && noVerticalSpace (descCandidate))
|
||||||
task.set ("description", descCandidate);
|
task.set ("description", descCandidate);
|
||||||
|
|
||||||
// TODO task.validate ()
|
// TODO task.validate () ?
|
||||||
// TODO if readOnlyCommand (cmd.command) then any attributes are allowed
|
|
||||||
// TODO if writeCommand (cmd.command) then only modifiable attributes are allowed
|
|
||||||
|
|
||||||
constructFilter ();
|
// Read-only command (reports, status, info ...) use filters. Write commands
|
||||||
|
// (add, done ...) do not.
|
||||||
|
if (cmd.isReadOnlyCommand ())
|
||||||
|
autoFilter ();
|
||||||
|
|
||||||
// If no command was specified, and there were no command line arguments
|
// If no command was specified, and there were no command line arguments
|
||||||
// then invoke the default command.
|
// then invoke the default command.
|
||||||
|
@ -490,7 +491,7 @@ std::cout << "[1;31m# parse post-termination description '" << *arg << "'[0m"
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// Add all the attributes in the task to the filter. All except uuid.
|
// Add all the attributes in the task to the filter. All except uuid.
|
||||||
void Context::constructFilter ()
|
void Context::autoFilter ()
|
||||||
{
|
{
|
||||||
foreach (att, task)
|
foreach (att, task)
|
||||||
{
|
{
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void loadCorrectConfigFile ();
|
void loadCorrectConfigFile ();
|
||||||
void parse ();
|
void parse ();
|
||||||
void constructFilter ();
|
void autoFilter ();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Config config;
|
Config config;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue