Created
August 29, 2013 21:19
-
-
Save ekyo/6383547 to your computer and use it in GitHub Desktop.
add the following to your .zshrc to be able to use 'explain'
Example Use: > explain ls -ltrsa list directory contents
-l use a long listing format
-t sort by modification time, newest first
-r, --reverse
reverse order while sorting
-s, --size
print the allocated size of each file, in blocks
-a, --all
do not ignore entries starting with .
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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