annotate required flags for bash_completions

some commands require that certain flags be set in order to function.
Annotate those flags so the bash completions will suggest to the user
that they be set.
This commit is contained in:
Eric Paris
2015-03-17 11:49:35 -04:00
parent d44e9b4880
commit 0620940d26
8 changed files with 23 additions and 0 deletions

View File

@@ -54,6 +54,7 @@ func NewCmdCreate(f *cmdutil.Factory, out io.Writer) *cobra.Command {
usage := "Filename, directory, or URL to file to use to create the resource"
kubectl.AddJsonFilenameFlag(cmd, &filenames, usage)
cmd.MarkFlagRequired("filename")
return cmd
}