mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
cli: set default completion
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
12
util/cobrautil/completion/completion.go
Normal file
12
util/cobrautil/completion/completion.go
Normal 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
|
||||
}
|
Reference in New Issue
Block a user