Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Last active November 19, 2021 20:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ttscoff/3cb637dc4041d3525c7361b31f0124e9 to your computer and use it in GitHub Desktop.
Save ttscoff/3cb637dc4041d3525c7361b31f0124e9 to your computer and use it in GitHub Desktop.
Spell check all markdown files in current git repo
#!/bin/bash
# Check spelling of all Markdown files in current git repo using aspell
for file in $(git ls-files|grep -v -E '(/|^)_'|grep -iE '\.(md|markdown)$'); do
aspell -M --lang=en --dont-backup --home-dir=$HOME --personal=$HOME/aspell.txt check "$file"
done
function spellcheck -d 'Check all Markdown files in git repo (recursive)'
for file in (git ls-files|grep -v -E '(/|^)_'|grep -iE '\.(md|markdown)$')
aspell -M --lang=en --dont-backup --home-dir=$HOME --personal=$HOME/aspell.txt check "$file"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment