MarkFlagFilename instructs the various shell completion implementations to limit completions for the named flag to the specified file extensions.
(flags *pflag.FlagSet, name string, extensions ...string)
| 65 | // MarkFlagFilename instructs the various shell completion implementations to |
| 66 | // limit completions for the named flag to the specified file extensions. |
| 67 | func MarkFlagFilename(flags *pflag.FlagSet, name string, extensions ...string) error { |
| 68 | return flags.SetAnnotation(name, BashCompFilenameExt, extensions) |
| 69 | } |
| 70 | |
| 71 | // MarkFlagCustom adds the BashCompCustom annotation to the named flag, if it exists. |
| 72 | // The bash completion script will call the bash function f for the flag. |
no outgoing calls
no test coverage detected