MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. The bash completion script will call the bash function f for the flag. This will only work for bash completion. It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows to register a Go functio
(name string, f string)
| 52 | // It is recommended to instead use c.RegisterFlagCompletionFunc(...) which allows |
| 53 | // to register a Go function which will work across all shells. |
| 54 | func (c *Command) MarkFlagCustom(name string, f string) error { |
| 55 | return MarkFlagCustom(c.Flags(), name, f) |
| 56 | } |
| 57 | |
| 58 | // MarkPersistentFlagFilename instructs the various shell completion |
| 59 | // implementations to limit completions for the named persistent flag to the |