Command flags can be inherited by child commands, but this needs careful handling. Some flags should only affect the root command, while others are useful globally:
--version should be root-only since version information applies to the whole program and probably only the root Exec function actually handles this flag
--verbose should be inherited since logging verbosity affects most commands
We might want to consider extending FlagMetadata to specify inheritance behavior per flag.
Command flags can be inherited by child commands, but this needs careful handling. Some flags should only affect the root command, while others are useful globally:
--versionshould be root-only since version information applies to the whole program and probably only the rootExecfunction actually handles this flag--verboseshould be inherited since logging verbosity affects most commandsWe might want to consider extending
FlagMetadatato specify inheritance behavior per flag.