You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currently, the help of the subcommands doesn't show the global flags/arguments of the parent.
Taking the following example:
equire"admiral"classParentCmd < Admiral::CommandclassChildCmd < Admiral::Commanddefine_helpdescription: "Execute a subcommand."define_argumentchildarg : String,description: "Arg for child",required: truedefrunputs"in ChildCmd with #{arguments.childarg}"endendregister_sub_commandchild : ChildCmd,"Child Command"define_flagparentflag : Bool,description: "Parent flag",default: false,short: pdefine_helpdescription: "Test subcommands help with global flag"defrunputshelpendendParentCmd.run
I would expect the parentflag to show up in the ChildCmd help page:
$ ./testsub --help
Usage:
./testsub [flags...] [arg...]
Test subcommands help with global flag
Flags:
--help # Displays help for the current command.
--parentflag, -p # Parent flag
Subcommands:
child # Execute a subcommand.
$ /testsub child --help
Usage:
./testsub child [flags...] <childarg> [arg...]
Execute a subcommand.
Flags:
--help # Displays help for the current command.
Arguments:
childarg (required) # Arg for child
The text was updated successfully, but these errors were encountered:
Hi,
currently, the help of the subcommands doesn't show the global flags/arguments of the parent.
Taking the following example:
I would expect the
parentflag
to show up in theChildCmd
help page:The text was updated successfully, but these errors were encountered: