mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-29 00:53:23 +02:00

* Update hooks to use `read -r` and `printf` This portably avoids any interpretation of backslash escapes by the shell. * Support running make_tc_task elsewhere * Add a test for backslashes in task descriptions
12 lines
236 B
Bash
12 lines
236 B
Bash
#!/usr/bin/env bash
|
|
|
|
read -r new_task
|
|
|
|
if (printf "%s" "$new_task" | grep -qE '[tT]eh');
|
|
then
|
|
new_task=$(printf "%s" "$new_task" | sed -r 's/([tT])eh/\1he/g')
|
|
echo "Auto-corrected 'teh' --> 'the'"
|
|
fi
|
|
|
|
printf "%s" "$new_task"
|
|
exit 0
|