1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # cheat: Setup http://cheat.sh
4 # Don't overwrite a real "cheat" command!
5 (( $+commands[cheat] )) && return
8 url="http://cheat.sh/$@?style=monokai"
10 if (( $+commands[curl] )); then
11 curl -s "$url" | ${PAGER:-less}
12 elif (( $+commands[wget] )); then
13 wget -qO - "$url" | ${PAGER:-less}
15 echo "Neither curl(1) nor wget(1) found!" >&2