cheat (350B)
1 #!/bin/sh 2 # Wrapper script for `curl cheat.sh`, also sets colors depending on system theme 3 if ! command -v curl 1>/dev/null 2>&1; then 4 echo "curl not installed." >&2 5 exit 1 6 fi 7 8 ! [ $# -ge 1 ] && echo "Argument required." && exit 1 9 if [ -f ~/.config/dark-theme ]; then query='' 10 else query='?style=trac'; fi 11 curl -Ls cheat.sh/"$1$query" | less -iR