Skip to content

Instantly share code, notes, and snippets.

@rfletcher
Created February 25, 2010 19:25
Show Gist options
  • Save rfletcher/314938 to your computer and use it in GitHub Desktop.
Save rfletcher/314938 to your computer and use it in GitHub Desktop.
alias stripansi="perl -ple 's/\033\[(?:\d*(?:;\d+)*)*m//g;'"
alias urlencode='perl -MURI::Escape -ne "\$/=\"\"; print uri_escape \$_"'
# use STDIN as the body of a new email in the default email client
# usage: git show head | mail
alias mail='open "mailto:?body=$(cat - | stripansi | urlencode)"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment