taskwarrior/test/test_hooks/on-add-modify
2024-12-17 19:08:48 -05:00

21 lines
392 B
Bash
Executable file

#!/usr/bin/env bash
# Input:
# - Line of JSON for proposed new task.
read new_task
if (echo $new_task | grep -qE '[tT]eh');
then
new_task=$(echo $new_task | sed -r 's/([tT])eh/\1he/g')
fi
# Output:
# - JSON, modified
# - Optional feedback/error.
echo $new_task
echo 'FEEDBACK'
# Status:
# - 0: JSON accepted, non-JSON is feedback.
# - non-0: JSON ignored, non-JSON is error.
exit 0