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

@@ -61,6 +61,7 @@ func NewCmdResize(f *cmdutil.Factory, out io.Writer) *cobra.Command {
cmd.Flags().String("resource-version", "", "Precondition for resource version. Requires that the current resource version match this value in order to resize.")
cmd.Flags().Int("current-replicas", -1, "Precondition for current size. Requires that the current size of the replication controller match this value in order to resize.")
cmd.Flags().Int("replicas", -1, "The new desired number of replicas. Required.")
cmd.MarkFlagRequired("replicas")
return cmd
}