Using aspell for spell checking.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user