mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug Fix - #203
- Zero-length command line project was being compared to a zero-length truncated task project, and always matching. Thanks to John Florian.
This commit is contained in:
parent
ab3de212bf
commit
b02c11be0e
2 changed files with 10 additions and 2 deletions
|
@ -670,8 +670,16 @@ void Context::autoFilter (Task& t, Filter& f)
|
|||
// Projects are matched left-most.
|
||||
else if (att->first == "project" && att->second.mod () == "")
|
||||
{
|
||||
f.push_back (Att ("project", "startswith", att->second.value ()));
|
||||
if (att->second.value () != "")
|
||||
{
|
||||
f.push_back (Att ("project", "startswith", att->second.value ()));
|
||||
debug ("auto filter: " + att->first + ".startswith:" + att->second.value ());
|
||||
}
|
||||
else
|
||||
{
|
||||
f.push_back (Att ("project", "is", att->second.value ()));
|
||||
debug ("auto filter: " + att->first + ".is:" + att->second.value ());
|
||||
}
|
||||
}
|
||||
|
||||
// The limit attribute does not participate in filtering, and needs to be
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#define FEATURE_TDB_OPT 1 // TDB Optimization reduces file I/O.
|
||||
#define FEATURE_NEW_ID 1 // Echoes back new id.
|
||||
#define FEATURE_SHELL 1 // Interactive shell.
|
||||
#define FEATURE_NCURSES_COLS 1 // Shortcut that avoids WINDOW.
|
||||
#define FEATURE_NCURSES_COLS 1 // Shortcut that avoids WINDOW.
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue