by ekyo777 · 13y ago · 0 comments
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 }
and call it, for example like: explain git status -s
% explain git status -s
explain:1: no such file or directory: http://explainshell.com/explain/git?args=status
curl: no URL specified!
sed: -e expression #1, char 11: unterminated `s' command
Try copying it from there: https://gist.github.com/ekyo/6383547
I can't edit my previous post anymore, if someone can maybe add something like "EDIT: copy/paste friendly version https://gist.github.com/ekyo/6383547" or better, fix the formatting so it works...