Mark filename flags for completions

This commit is contained in:
Fabiano Franz
2016-03-11 19:06:42 -03:00
parent bf07a6f5e1
commit 9ddacfa25f
9 changed files with 98 additions and 11 deletions

View File

@@ -37,6 +37,7 @@ func AddPrinterFlags(cmd *cobra.Command) {
// template shorthand -t is deprecated to support -t for --tty
// TODO: remove template flag shorthand -t
cmd.Flags().StringP("template", "t", "", "Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].")
cmd.MarkFlagFilename("template")
cmd.Flags().MarkShorthandDeprecated("template", "please use --template instead")
cmd.Flags().String("sort-by", "", "If non-empty, sort list types using this field specification. The field specification is expressed as a JSONPath expression (e.g. '{.metadata.name}'). The field in the API resource specified by this JSONPath expression must be an integer or a string.")
cmd.Flags().BoolP("show-all", "a", false, "When printing, show all resources (default hide terminated pods.)")