Save the command name for use in extended arguments.
@@ -109,6 +109,7 @@ def cli_entry_pipe(args, parsed_shared_args, shared_args, parser, sub_parsers, s
add_default_arguments(sub_parser) # call this before adding other arguments
if cmd_name not in subparsers_built:
if hasattr(mod, 'add_arguments_extended'):
+ parsed_shared_args._command = cmd_name
mod.add_arguments_extended(sub_parser, parsed_shared_args)
else:
mod.add_arguments(sub_parser)
