taskwarrior/scripts/hooks/on-add
Paul Beckingham 8e730f2da3 Hooks
- Updated examples to not rely on bash being in /bin.
2015-02-07 10:25:50 -05:00

19 lines
429 B
Bash
Executable file

#!/bin/sh
# The on-add event is triggered separately for each task added. This hook
# script can accept/reject the addition. Processing will continue.
# Input:
# - Line of JSON for proposed new task.
read new_task
# Output:
# - JSON, modified or unmodified.
# - Optional feedback/error.
echo $new_task
echo 'on-add'
# Status:
# - 0: JSON accepted, non-JSON is feedback.
# - non-0: JSON ignored, non-JSON is error.
exit 0