taskwarrior/scripts/hooks/on-exit
2015-08-12 23:21:16 -04:00

23 lines
407 B
Bash
Executable file

#!/bin/sh
# The on-exit event is triggered once, after all processing is complete.
# This hook script has no effect on processing.
# Input:
# - line of JSON for each modified task
# Output:
# - Optional feedback/error.
n=0
while read modified_task
do
n=$(($n + 1))
done
echo "on-exit: Counted $n added/modified tasks."
# Status:
# - 0: Non-JSON is feedback.
# - non-0: Non-JSON is error.
exit 0