minor bug fix to ensure improper usage message is displayed
This commit is contained in:
@@ -1,16 +1,6 @@
|
|||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
|
|
||||||
# Catch any invalid input.
|
|
||||||
if [[ $# -eq 0 || $# -gt 2 ]]; then
|
|
||||||
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"
|
|
||||||
|
|
||||||
# Display help.
|
# Display help.
|
||||||
elif [[ $1 == "-h" || $1 == "--help" ]]; then
|
if [[ $1 == "-h" || $1 == "--help" ]]; then
|
||||||
echo "Available commands:"
|
echo "Available commands:"
|
||||||
echo " user [user]"
|
echo " user [user]"
|
||||||
echo " eg. lookup user quaxlyqueen"
|
echo " eg. lookup user quaxlyqueen"
|
||||||
@@ -28,4 +18,14 @@ elif [[ $1 == "repo" ]]; then
|
|||||||
|
|
||||||
# TODO need to implement.
|
# TODO need to implement.
|
||||||
firefox https://github.com/$2
|
firefox https://github.com/$2
|
||||||
|
|
||||||
|
# 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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user