Skip to content

Commit d66f26f

Browse files
committed
Improve help output
1 parent b94c14e commit d66f26f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

git-get

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ fi
1212

1313
repo="$1"
1414

15-
if [ -z "$repo" ]; then
16-
echo "Usage git get <repository>"
15+
if [ -z "$repo" ] || [ "$repo" == "-h" ]; then
16+
echo "Usage: git get <repository>"
1717
echo
1818
echo " git-get clones <repository> into a folder derived from the repository URL"
1919
echo
@@ -22,7 +22,12 @@ if [ -z "$repo" ]; then
2222
echo
2323
echo " You can override the default base path (~/code) with"
2424
echo " git config --global get.loation \"/path/to/your/code\""
25-
exit 1
25+
26+
if [ "$repo" == "-h" ]; then
27+
exit
28+
else
29+
exit 1
30+
fi
2631
fi
2732

2833
# Strip scheme

0 commit comments

Comments
 (0)