--- a/t.py Fri Sep 09 14:13:59 2011 +0530
+++ b/t.py Tue Sep 20 18:45:58 2011 -0400
@@ -268,6 +268,9 @@
output.add_option("-q", "--quiet",
action="store_true", dest="quiet", default=False,
help="print less detailed output (no task ids, etc)")
+ output.add_option("--done",
+ action="store_true", dest="done", default=False,
+ help="list done tasks instead of unfinished ones")
parser.add_option_group(output)
return parser
@@ -293,7 +296,8 @@
td.add_task(text)
td.write(options.delete)
else:
- td.print_list(verbose=options.verbose, quiet=options.quiet,
+ kind = 'tasks' if not options.done else 'done'
+ td.print_list(kind=kind, verbose=options.verbose, quiet=options.quiet,
grep=options.grep)
except AmbiguousPrefix, e:
sys.stderr.write('The ID "%s" matches more than one task.\n' % e.prefix)