Skip to content

Instantly share code, notes, and snippets.

@philwinkle
Forked from ekyo/explain.zshrc
Created August 29, 2013 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philwinkle/6383617 to your computer and use it in GitHub Desktop.
Save philwinkle/6383617 to your computer and use it in GitHub Desktop.
explain(){ curl -s $(echo "http://explainshell.com/explain/$1?args=${@:2}" | sed -e 's/ /+/g') |
sed -n '/<pre/,/<\/pre>/p' | sed -s 's/<[^>]*>//g' | sed -e 's/^ *//g;s/ *$//g' | grep '.' | cat }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment