cli: set default completion

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-04-09 21:20:18 +02:00
committed by CrazyMax
parent 1e149bb84f
commit 8a02cf8717
17 changed files with 49 additions and 4 deletions

View File

@ -0,0 +1,12 @@
package completion
import (
"github.com/spf13/cobra"
)
// ValidArgsFn defines a completion func to be returned to fetch completion options
type ValidArgsFn func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)
func Disable(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
return nil, cobra.ShellCompDirectiveNoSpace
}