add completions to survey

This commit is contained in:
Robin Olsen
2026-02-28 10:44:41 +01:00
parent 9ce9b6ee07
commit 8cdaf93f26
8 changed files with 47 additions and 35 deletions

10
internal/commands/util.go Normal file
View File

@@ -0,0 +1,10 @@
package commands
import "github.com/spf13/cobra"
// completionFunc returns a function that provides shell completion for the given options.
func CompletionFunc(options []string) func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective) {
return func(_ *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return options, cobra.ShellCompDirectiveDefault
}
}