Skip to content

Instantly share code, notes, and snippets.

@hatzopoulos
Last active August 29, 2015 14:17
Show Gist options
  • Save hatzopoulos/f060df38d734fd35f71e to your computer and use it in GitHub Desktop.
Save hatzopoulos/f060df38d734fd35f71e to your computer and use it in GitHub Desktop.
recursively fix whitespace using https://github.com/hatzopoulos/wtf
# download wtf somewhere in your path and make it executable
curl https://raw.githubusercontent.com/hatzopoulos/wtf/entropy/wtf.py > ~/bin/wtf.py && chmod 0755 !#:3
# declare a function similar to
wtf-find() {
find "${@: -1}" -not \( -name .svn -prune -o -name .git -prune \
-o -name .hg -prune \) -type f -exec bash -c \
'grep -Il "" "$1" &>/dev/null && wtf.py '"${*:1:$#-1}"' "$1"' _ {} \;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment