Skip to content

Commit 3d71f47

Browse files
committed
auto completion test 4
1 parent bc6bdf3 commit 3d71f47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/root.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ var rootCmd = &cobra.Command{
3131

3232
func init() {
3333
rootCmd.Flags().BoolP("version", "v", false, "Print version information")
34-
rootCmd.RegisterFlagCompletionFunc("version", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
35-
return []string{}, cobra.ShellCompDirectiveNoFileComp
34+
rootCmd.RegisterFlagCompletionFunc("format", func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
35+
return []string{"update", "-v", "--version"}, cobra.ShellCompDirectiveDefault
3636
})
3737
}
3838

0 commit comments

Comments
 (0)