Skip to content

Instantly share code, notes, and snippets.

@dylan-chong
Created April 3, 2018 00:42
Show Gist options
  • Save dylan-chong/2b2dfbda40dbd1783665cbe2f447ae2f to your computer and use it in GitHub Desktop.
Save dylan-chong/2b2dfbda40dbd1783665cbe2f447ae2f to your computer and use it in GitHub Desktop.
wcme() {
NAME=`git config user.name`
git blame "$1" \
| egrep "\($NAME" \
| egrep -v '<!--' \
| perl -pe 's/.*\d+\)(.*)/\1/' \
| wc -w
}
wcme file.md # => 123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment