e8ad76b464c2

Merge.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Tue, 20 Sep 2011 18:45:58 -0400
parents 804731e83b69 (diff) 2d2bbd81ed58 (current diff)
children 2e3102258623
branches/tags (none)
files t.py

Changes

--- 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)