Skip to content

Instantly share code, notes, and snippets.

View droctothorpe's full-sized avatar

Alex droctothorpe

View GitHub Profile
@droctothorpe
droctothorpe / explain.sh
Last active February 21, 2019 02:55
explain
explain () {
if [ "$#" -eq 0 ]
then
while read -p "Command: " cmd
do
curl -Gs "https://www.mankier.com/api/explain/?cols="$(tput cols) --data-urlencode "q=$cmd"
done
echo "Bye!"
elif [ "$#" -eq 1 ]
then