From 8759535363ab8f5e1c49cc4e6a5716b81e3960eb Mon Sep 17 00:00:00 2001 From: laervn <37139544+laervn@users.noreply.github.com> Date: Thu, 18 Dec 2025 05:00:32 +0100 Subject: [PATCH] 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 --- staging/src/k8s.io/kubectl/pkg/cmd/explain/explain.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/kubectl/pkg/cmd/explain/explain.go b/staging/src/k8s.io/kubectl/pkg/cmd/explain/explain.go index d5b73282647..8d2af8913a4 100644 --- a/staging/src/k8s.io/kubectl/pkg/cmd/explain/explain.go +++ b/staging/src/k8s.io/kubectl/pkg/cmd/explain/explain.go @@ -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)") }