From: Tomas Babej Date: Sun, 29 Mar 2015 10:58:22 +0000 (+0200) Subject: Detect data location and do not nest recurrence generation X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/1f6fdd55fe34c9d587424c1884e02e0521d1dd49?ds=sidebyside;hp=--cc Detect data location and do not nest recurrence generation --- 1f6fdd55fe34c9d587424c1884e02e0521d1dd49 diff --git a/on-add-shift-all-recurrence b/on-add-shift-all-recurrence index 0a0f065..87817f8 100755 --- a/on-add-shift-all-recurrence +++ b/on-add-shift-all-recurrence @@ -1,6 +1,7 @@ #!/usr/bin/python import sys +import os from tasklib.task import Task, TaskWarrior time_attributes = ('wait', 'until', 'scheduled') @@ -17,7 +18,8 @@ def is_new_local_recurrence_child_task(task): return True task = Task.from_input() -tw = TaskWarrior() +tw = TaskWarrior(data_location=os.path.dirname(os.path.dirname(sys.argv[0]))) +tw.config.update(dict(recurrence="no")) if is_new_local_recurrence_child_task(task): parent = tw.tasks.get(uuid=task['parent'])