# HG changeset patch # User Steve Losh # Date 1316558758 14400 # Node ID e8ad76b464c29cb82ae973d1227d918bbb7efc8b # Parent 804731e83b69c528286fd184585d0884d29a45a5# Parent 2d2bbd81ed586d48f34cff15b69e7c97fd58d9a5 Merge. diff -r 2d2bbd81ed58 -r e8ad76b464c2 t.py --- 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)