mirror of
https://github.com/shokinn/.files.git
synced 2025-01-18 13:22:25 +00:00
print help, when no option is given
This commit is contained in:
parent
25812b06a3
commit
2ce072c6a4
|
@ -233,7 +233,7 @@ LONGOPTS=passbase:,file:,help,identity:,key:,output:,path:
|
|||
# -temporarily store output to be able to check for errors
|
||||
# -activate quoting/enhanced mode (e.g. by writing out “--options”)
|
||||
# -pass arguments only via -- "$@" to separate them correctly
|
||||
! PARSED=$(getopt --options=${OPTIONS} --longoptions=${LONGOPTS} --name "$(basename ${0})" -- "${@}")
|
||||
! PARSED=$(getopt --options=${OPTIONS} --longoptions=${LONGOPTS} --name "$(basename ${0})" -- "${@:--h}")
|
||||
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
|
||||
# e.g. return value is 1
|
||||
# then getopt has complained about wrong arguments to stdout
|
||||
|
|
Loading…
Reference in a new issue