File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -289,6 +289,9 @@ declare _GO_INJECT_MODULE_PATH="$_GO_INJECT_MODULE_PATH"
289289 if [[ " $_GO_HELP_HIJACK " == ' true' ]] \
290290 && [[ " $* " == * ' -h ' * || " $* " == * ' --help ' * || " $* " == * ' -help ' * ]]; then
291291 cmd=' help'
292+ if [[ " ${1-} " == @ (-h| -help| --help) && " $# " -gt 0 ]]; then
293+ shift
294+ fi
292295 else
293296 local cmd=" ${1-} "
294297 if [[ " $# " -gt 0 ]]; then
@@ -301,14 +304,14 @@ declare _GO_INJECT_MODULE_PATH="$_GO_INJECT_MODULE_PATH"
301304 _@go.source_builtin ' help' 1>&2
302305 return 1
303306 ;;
307+ -h | -help | --help)
308+ cmd=' help'
309+ ;;
304310 -* )
305311 @go.printf " Unknown flag: $cmd \n\n"
306312 _@go.source_builtin ' help' 1>&2
307313 return 1
308314 ;;
309- -h | -help | --help)
310- cmd=' help'
311- ;;
312315 edit)
313316 if [[ -z " $EDITOR " ]]; then
314317 echo " Cannot edit $@ : \$ EDITOR not defined."
You can’t perform that action at this time.
0 commit comments