8000 Default --version option is not working for subcommands · Issue #1567 · spectreconsole/spectre.console · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Default --version option is not working for subcommands #1567
Closed
@ericsuhong

Description

@ericsuhong

Information

  • OS: Windows
  • Version: 0.47.0
  • Terminal: Windows Terminal

Describe the bug
--version option is working for the root command as expected.

However, when I run --version option for any subcommands, it does not print version and --version option is ignored.

mycommand --version
1.0.0

mycommand subcommand --version
... runs the subcommand without printing out the version

This is confusing because --help option displays --version as a valid option for all subcommands by default.

mycommand subcommand --help

USAGE:
    mycommand subcommand [OPTIONS]

OPTIONS:
                     DEFAULT
    -h, --help                           Prints help information
    -v, --version                        Prints version information
    -o, --output     test                   My custom option

To Reproduce
Run any spectre subcommands with --version.

Expected behavior
--version MUST NOT be displayed by default as part of --help output for subcommands that do not have explicitly defined --version option.


Please upvote 👍 this issue if you are interested in it.

Metadata

Metadata

Assignees

Labels

⭐ top bugTop bug.area-CLICommand-Line InterfacebugSomething isn't working

Type

No type

Projects

Status

Done 🚀

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0