Skip to content
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

Parent command flags are duplicated in subcommands #43

Closed
mdippery opened this issue May 10, 2016 · 1 comment
Closed

Parent command flags are duplicated in subcommands #43

mdippery opened this issue May 10, 2016 · 1 comment

Comments

@mdippery
Copy link
Contributor

A change related to #42 allowed subcommands to inherit flags from their parent. Unfortunately, this change has resulted in some duplication of flags. As shown in the example above, the flags -h, -v, and -t are now printed twice in the help output when help for subcommands are shown, which is unexpected and looks a bit odd. It's especially pronounced in subcommands in which the parent command does not have any flags; two blocks for -h, -v, and -t are printed consecutively now, like this:

Options:
            --date FORMAT  Show dates in "absolute" or "relative" format
            --grep STRING  Show only comments matching STRING
  -n LIMIT, --limit LIMIT  Only show n comments
            --oneline      Output log in a more compact form
            --raw          Print raw comment bodies
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs
        -h, --help         Show this message
        -v, --version      Print the name and version
        -t, --trace        Show the full backtrace when an error occurs
@mdippery
Copy link
Contributor Author

Closing this since I opened a pull request in #44.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant