FromList offers completion for the given list of options.
(options ...string)
| 169 | |
| 170 | // FromList offers completion for the given list of options. |
| 171 | func FromList(options ...string) cobra.CompletionFunc { |
| 172 | return Unique(cobra.FixedCompletions(options, cobra.ShellCompDirectiveNoFileComp)) |
| 173 | } |
| 174 | |
| 175 | // FileNames is a convenience function to use [cobra.ShellCompDirectiveDefault], |
| 176 | // which indicates to let the shell perform its default behavior after |
searching dependent graphs…