Skip to content

Commit dc5ada0

Browse files
committed
fix: fix completion commands to assign output to variables
- Fix completion command to assign the output of GenBashCompletion to a variable instead of discarding it - Fix completion command to assign the output of GenZshCompletion to a variable instead of discarding it - Fix completion command to assign the output of GenFishCompletion to a variable instead of discarding it - Fix completion command to assign the output of GenPowerShellCompletionWithDesc to a variable instead of discarding it Signed-off-by: appleboy <[email protected]>
1 parent 9c39122 commit dc5ada0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/completion.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ var CompletionCmd = &cobra.Command{
1616
Run: func(cmd *cobra.Command, args []string) {
1717
switch args[0] {
1818
case "bash":
19-
cmd.Root().GenBashCompletion(os.Stdout)
19+
_ = cmd.Root().GenBashCompletion(os.Stdout)
2020
case "zsh":
21-
cmd.Root().GenZshCompletion(os.Stdout)
21+
_ = cmd.Root().GenZshCompletion(os.Stdout)
2222
case "fish":
23-
cmd.Root().GenFishCompletion(os.Stdout, true)
23+
_ = cmd.Root().GenFishCompletion(os.Stdout, true)
2424
case "powershell":
25-
cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout)
25+
_ = cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout)
2626
}
2727
},
2828
}

0 commit comments

Comments
 (0)