aboutsummaryrefslogtreecommitdiffziptar.gz
path: root/wf.py
diff options
context:
space:
mode:
Diffstat (limited to 'wf.py')
-rwxr-xr-xwf.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/wf.py b/wf.py
index 4b901ab..15b5e2d 100755
--- a/wf.py
+++ b/wf.py
@@ -1100,8 +1100,11 @@ def cmd_done(args) -> int:
solo = [i for i in task_ids if doc.item(i).sessions == "solo"]
for id in args.ids:
if id.startswith("a-"):
- tasks.remove(doc, id)
- out.append(f"removed: {id}")
+ item = tasks.remove(doc, id)
+ if args.m:
+ line = tasks.archive_line(today, item, args.m)
+ p.new_archive = tasks.archive_prepend(p.new_archive or p.archive_text, line)
+ out.append(f"removed: {id}" + (f" → {p.cfg.rel(p.cfg.archive)}" if args.m else ""))
freed = tasks.unblock(doc, id)
if freed:
out.append("unblocked: " + ", ".join(freed))