kubectl explain: Add -r shorthand flag for --recursive (#135283)

* kubectl explain: Add -r shorthand flag for --recursive

* kubectl explain: Change --recursive shorthand flag to R
This commit is contained in:
laervn
2025-12-18 05:00:32 +01:00
committed by GitHub
parent a9266c35ab
commit 8759535363

View File

@@ -87,7 +87,7 @@ func NewExplainFlags(streams genericiooptions.IOStreams) *ExplainFlags {
// AddFlags registers flags for a cli
func (flags *ExplainFlags) AddFlags(cmd *cobra.Command) {
cmd.Flags().BoolVar(&flags.Recursive, "recursive", flags.Recursive, "Print the fields of fields (Currently only 1 level deep)")
cmd.Flags().BoolVarP(&flags.Recursive, "recursive", "R", flags.Recursive, "Print the fields of fields (Currently only 1 level deep)")
cmd.Flags().StringVar(&flags.APIVersion, "api-version", flags.APIVersion, "Get different explanations for particular API version (API group/version)")
cmd.Flags().StringVarP(&flags.OutputFormat, "output", "o", plaintextTemplateName, "Format in which to render the schema (plaintext, plaintext-openapiv2)")
}