Calling Application.add_command_group() to add a CommandGroup whose name matches one the default groups causes the groups to stay duplicated, which affects the help output.
To Reproduce
In this example, rockcraft has an init command in the Other group:
$ rockcraft --help
Usage:
rockcraft [help] <command>
Summary: A tool to create OCI images
Global options:
-h, --help: Show this help message and exit
-v, --verbose: Show debug information and be more verbose
-q, --quiet: Only show warnings and errors, not progress
--verbosity: Set the verbosity level to 'quiet', 'brief',
'verbose', 'debug' or 'trace'
-V, --version: Show the application version and exit
Starter commands:
version: Show the application version and exit
Commands can be classified as follows:
Extensions: expand-extensions, list-extensions
Lifecycle: build, clean, pack, prime, pull, stage
Other: version
Other: init
For more information about a command, run 'rockcraft help <command>'.
For a summary of all commands, run 'rockcraft help --all'.
Bug Description
Calling
Application.add_command_group()
to add aCommandGroup
whosename
matches one the default groups causes the groups to stay duplicated, which affects the help output.To Reproduce
In this example,
rockcraft
has aninit
command in theOther
group:See that there are two rows for "Other:"
part yaml
Relevant log output