Add shell quoting and 'read -r' in example hooks (#3905)

This helps to avoid interpretation of escape sequences, such as
backslash-escapes, in these values.

Patch provided by @bughunter2 in https://github.com/GothenburgBitFactory/taskwarrior/issues/3899.
This commit is contained in:
Dustin J. Mitchell 2025-06-26 09:34:43 -04:00 committed by GitHub
parent c594ecb58d
commit cf6c0254dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 12 additions and 12 deletions

View file

@ -5,12 +5,12 @@
# Input:
# - Line of JSON for proposed new task.
read new_task
read -r new_task
# Output:
# - JSON, modified or unmodified.
# - Optional feedback/error.
echo $new_task
echo "$new_task"
echo 'on-add'
# Status: