Commit b32a523e authored by Bram Schoenmakers's avatar Bram Schoenmakers

Allow optional expression for the ls command.

parent 78dd77a9
......@@ -75,13 +75,12 @@ class Application(object):
else:
error("Invalid priority given.")
def list(self, p_expression=None):
def list(self):
sorter = Sorter.Sorter(Config.SORT_STRING)
filters = [Filter.RelevanceFilter()]
if p_expression:
filters.append(Filter.GrepFilter(p_expression))
if len(sys.argv) > 1:
filters.append(Filter.GrepFilter(sys.argv[2]))
print self.todolist.view(sorter, filters)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment