MarkPersistentFlagRequired instructs the various shell completion implementations to prioritize the named persistent flag when performing completion, and causes your command to report an error if invoked without the flag.
(name string)
| 29 | // prioritize the named persistent flag when performing completion, |
| 30 | // and causes your command to report an error if invoked without the flag. |
| 31 | func (c *Command) MarkPersistentFlagRequired(name string) error { |
| 32 | return MarkFlagRequired(c.PersistentFlags(), name) |
| 33 | } |
| 34 | |
| 35 | // MarkFlagRequired instructs the various shell completion implementations to |
| 36 | // prioritize the named flag when performing completion, |