Skip to content

Commit

Permalink
fix: make lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lizzy-0323 committed Nov 25, 2024
1 parent d1914af commit b5c1de4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/cli/cmd/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,11 @@ func runCompletionBash(out io.Writer, boilerPlate string, cmd *cobra.Command) er
}

func runCompletionZsh(out io.Writer, boilerPlate string, cmd *cobra.Command) error {
// Add zsh completion header to specifiy the command to complete for zsh
// Add zsh completion header to specify the command to complete for zsh
zshHead := fmt.Sprintf("#compdef %[1]s\ncompdef _%[1]s %[1]s\n", cmd.Name())
out.Write([]byte(zshHead))
if _, err := out.Write([]byte(zshHead)); err != nil {
return err
}

if len(boilerPlate) == 0 {
boilerPlate = defaultBoilerPlate
Expand Down

0 comments on commit b5c1de4

Please sign in to comment.