Add multiple flags/args that do the same (options are good)

This commit is contained in:
BBaoVanC 2021-01-04 20:34:49 -06:00
parent 69ce777957
commit 9f4fb0960b
No known key found for this signature in database
GPG key ID: 18089E4E3CCF1D3A

View file

@ -10,14 +10,18 @@ done
tmpfile="$(mktemp -p /tmp nekofetchXXXXXXXX)"
case "$1" in
"--nsfw")
"--nsfw"|"nsfw"|"-n"|"n")
echo "Getting a nsfw image"
imgurl="https://nekos.life/api/v2/img/cum_jpg"
;;
*)
"--sfw"|"sfw"|"-s"|"s")
echo "Getting a sfw image"
imgurl="https://nekos.life/api/v2/img/neko"
;;
*)
echo "Could not interpret as either sfw or nsfw. Defaulting to sfw."
imgurl="https://nekos.life/api/v2/img/neko"
;;
esac
height=${2:-$(($(stty size | awk '{print $1}') - 5))}