taskwarrior/scripts/hooks/on-modify
Paul Beckingham 51291f76fe Hooks
- Updated documentation and style of example hook scripts.
2014-09-09 23:09:24 -04:00

22 lines
636 B
Bash
Executable file

#!/bin/bash
# The on-modify event is triggered separately for each task added or modified
# Input:
# - line of JSON for the original task
# - line of JSON for the modified task, the diff being the modification
# Output:
# - all emitted JSON lines are added/modified as tasks, if the exit code is
# zero, otherwise ignored.
# - minimal new task: {"description":"Buy milk"}
# - to modify a task include complete JSON
# - all emitted non-JSON lines are considered feedback messages if the exit
# code is zero, otherwise they are considerederrors.
read original_task
read modified_task
echo $modified_task
echo 'on-modify'
exit 0