Using aspell for spell checking.

This commit is contained in:
Vahagn Khachatryan
2020-06-24 07:17:37 -04:00
parent 4e09a246af
commit 268e368271
2 changed files with 11 additions and 4 deletions

View File

@@ -32,11 +32,13 @@
# 3. Move this file into your repository
# $ mv commit-msg /path/to/repo/.git/hooks
# $ chmod +x /path/to/repo/.git/hooks/commit-msg
#
CHECK=$(cat $1 | hunspell -d en_US -l)
CHECK=$(cat $1 | aspell --lang=en_US list --add-extra-dicts=$HOME/.aspell.en_US.per)
#CHECK=$(cat $1 | hunspell -s -d en_US,${HOME}/devel/scripts/git/my_dictionary -l)
if [ "${CHECK}" != "" ]; then
echo "Spell Check Error: ${CHECK}"
echo "Message: $(cat $1)"
echo "Spell Check Error:"
#cat $1 | hunspell -a -d en_US,${HOME}/devel/scripts/git/my_dictionary -l
cat $1 | aspell -a --lang=en_US list --add-extra-dicts=$HOME/.aspell.en_US.per
echo "Use --no-verify if you want to commit."
exit 1
fi