-
Notifications
You must be signed in to change notification settings - Fork 31
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
Target is a required argument even though it appears to be optional in help #36
Comments
It's an optional argument when the |
Is there a way to indicate the different paths that the user can take and the required flags for each one? Check out these two examples: git version 2.18.0:$ git --help
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>] Note the non-optional Homebrew version 2.1.7$ brew --help
Example usage:
brew search [TEXT|/REGEX/]
brew info [FORMULA...]
brew install FORMULA...
brew update
brew upgrade [FORMULA...]
brew uninstall FORMULA...
brew list [FORMULA...] Note that the optional flags are listed after each required command. I'm not sure what's the best option for |
It's possible to have a similar pattern with a required Unfortunately,
I don't intend to change the command line API of I should also note that the direct |
Before I start using any CLI, I like to go through its
--help
options to make sure I understand how to use it. In this case, here is the abbreviated output ofgit-revise
version 0.4.2:As you can see on the last line,
[target]
appears to be optional since it's wrapped in square brackets ([]
). However, when I callgit-revise
with no additional parameters in some repo, it reports the following error:Please consider updating the
--help
output to indicate thattarget
is in fact a required argument.The text was updated successfully, but these errors were encountered: