Question / Feature Request
Is there an intended way to modify, add, or pass arguments from a parent parser to a subparser when using the with_annotated decorator?
With the with_argparse approach this is straightforward because you have access to the full namespace.
Example:
class App(Cmd):
@with_annotated(subcommand_to=parent)
def do_sub(...) -> None:
... # use possibly modified parent_argument here
@with_annotated(base_command=True)
def do_parent(parent_argument: ...) -> None:
... # possibly modify parent_argument here
I would like to use parent_argument (defined on the parent parser) in do_sub either as an argument hidden from the subparser or by accessing the full namespace of the parser.
Is ns_provider intended for this use case? If so I cannot see how.
Question / Feature Request
Is there an intended way to modify, add, or pass arguments from a parent parser to a subparser when using the
with_annotateddecorator?With the
with_argparseapproach this is straightforward because you have access to the full namespace.Example:
I would like to use
parent_argument(defined on the parent parser) indo_subeither as an argument hidden from the subparser or by accessing the full namespace of the parser.Is
ns_providerintended for this use case? If so I cannot see how.