-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-h and --help do not honour the -- operator #41
Labels
Comments
Same behaviour with -v and --version |
jawher
added a commit
that referenced
this issue
Jan 22, 2017
" mow.cli" used to search for -h, --help, -v, --version, ... shortcuts in all the arguments. This causes an issue with `--` (all what follows is an arg), e.g.: ``` app -- -h ``` Would still display the app help instead of treating `-h` as the argument it is. Fixes #41
jawher
added a commit
that referenced
this issue
Jan 22, 2017
" mow.cli" used to search for -h, --help, -v, --version, ... shortcuts in all the arguments. This causes an issue with `--` (all what follows is an arg), e.g.: ``` app -- -h ``` Would still display the app help instead of treating `-h` as the argument it is. Fixes #41
jawher
added a commit
that referenced
this issue
Jul 27, 2017
" mow.cli" used to search for -h, --help, -v, --version, ... shortcuts in all the arguments. This causes an issue with `--` (all what follows is an arg), e.g.: ``` app -- -h ``` Would still display the app help instead of treating `-h` as the argument it is. Fixes #41
jawher
added a commit
that referenced
this issue
Aug 14, 2017
" mow.cli" used to search for -h, --help, -v, --version, ... shortcuts in all the arguments. This causes an issue with `--` (all what follows is an arg), e.g.: ``` app -- -h ``` Would still display the app help instead of treating `-h` as the argument it is. Fixes #41
jawher
added a commit
that referenced
this issue
Aug 15, 2017
" mow.cli" used to search for -h, --help, -v, --version, ... shortcuts in all the arguments. This causes an issue with `--` (all what follows is an arg), e.g.: ``` app -- -h ``` Would still display the app help instead of treating `-h` as the argument it is. Also, this PR changes how the library handles encountering help and version flags. Instead of calling os.exit, the value of `errorHandling` is now used to decide. If it is `ContinueOnError`, than exit is not called and an nil error is returned from `app.Run`. The old behaviour is still available with `ExitOnError`. Fixes #41
jawher
added a commit
that referenced
this issue
Aug 16, 2017
" mow.cli" used to search for -h, --help, -v, --version, ... shortcuts in all the arguments. This causes an issue with `--` (all what follows is an arg), e.g.: ``` app -- -h ``` Would still display the app help instead of treating `-h` as the argument it is. Also, this PR changes how the library handles encountering help and version flags. Instead of calling os.exit, the value of `errorHandling` is now used to decide. If it is `ContinueOnError`, than exit is not called and an nil error is returned from `app.Run`. The old behaviour is still available with `ExitOnError`. Fixes #41
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given an app or a command with the following spec
CMD -- ARG...
, calling the command withgo -h
for example would still print the command help instead of parsing-h
asARG
.The text was updated successfully, but these errors were encountered: