nix-prefetch-git: add -h as shortcut for --help to improve quality of life

Especially as a new user it is a much better experience to receive a
proper help response to `-h`. Currently passing `-h` will cause some
runtime error with the `git remote` error help being shown. Not very
helpful.

It doesn't hurt to be a bit more user friendly in this case.
This commit is contained in:
Andreas Rammhold 2019-05-03 23:48:28 +02:00
parent 75c98a83ab
commit 46f84adc0c
No known key found for this signature in database
GPG Key ID: 74908259861E8386

View File

@ -68,7 +68,7 @@ for arg; do
--leave-dotGit) leaveDotGit=true;;
--fetch-submodules) fetchSubmodules=true;;
--builder) builder=true;;
--help) usage; exit;;
-h|--help) usage; exit;;
*)
: $((++argi))
case $argi in