X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/blobdiff_plain/30d3b8550bb23a98b899e636366471e1bbed08e7..6e1c2eb4c5746540770d5649aea717d6f80a9c9e:/tasklib/task.py?ds=inline diff --git a/tasklib/task.py b/tasklib/task.py index b1af4f7..6392b9e 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -433,9 +433,15 @@ class TaskFilter(SerializingObject): if key == 'uuid': self.filter_params.insert(0, value) else: - # We enforce equality match by using is keyword - # Also, without using this syntax, filter fails due to TW-1479 - self.filter_params.append("{0}.is:'{1}'".format(key, value)) + # Surround value with aphostrophes unless it's a empty string + value = "'%s'" % value if value else '' + + # We enforce equality match by using 'is' (or 'none') modifier + # Without using this syntax, filter fails due to TW-1479 + modifier = '.is' if value else '.none' + key = key + modifier if '.' not in key else key + + self.filter_params.append("{0}:{1}".format(key, value)) def get_filter_params(self): return [f for f in self.filter_params if f] @@ -564,6 +570,7 @@ class TaskWarrior(object): self.config = { 'data.location': os.path.expanduser(data_location), 'confirmation': 'no', + 'dependency.confirmation': 'no', # See TW-1483 or taskrc man page } self.tasks = TaskQuerySet(self) self.version = self._get_version()