This commit is contained in:
Josh Ashton
2024-02-12 10:23:33 -07:00
parent da327dc22a
commit b7b93f7a43
-31
View File
@@ -1,31 +0,0 @@
#!/bin/zsh
# Display help.
if [[ $1 == "-h" || $1 == "--help" ]]; then
echo "Available commands:"
echo " user [user]"
echo " eg. lookup user quaxlyqueen"
echo " repo [user] [repo]"
echo " eg. lookup repo quaxlyqueen/dnd"
echo " -h"
echo " --help"
# Lookup a user.
elif [[ $1 == "user" ]]; then
firefox "https://github.com/search?q=$2&type=users"
# Lookup a repo.
elif [[ $1 == "repo" ]]; then
firefox "https://github.com/search?q=$2&type=repositories"
# Catch any invalid input.
else
echo "Improper usage: lookup [command] [search term]"
echo "Available commands:"
echo " user [user]"
echo " eg. lookup user quaxlyqueen"
echo " repo [user] [repo]"
echo " eg. lookup repo quaxlyqueen/dnd"
fi