Skip to content

Commit f1fa097

Browse files
committed
Fix fish completion
`ToFishCompletion()` returns an error that needs to be handled.
1 parent aaca5f4 commit f1fa097

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

command/completion/completion.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ func Completion(ctx *cli.Context) error {
108108
case "zsh":
109109
fmt.Print(zsh)
110110
case "fish":
111-
fmt.Print(ctx.App.ToFishCompletion())
111+
fish, err := ctx.App.ToFishCompletion()
112+
if err != nil {
113+
return fmt.Errorf("error creating fish completion: %w", err)
114+
}
115+
fmt.Print(fish)
112116
default:
113117
return errors.Errorf("unsupported shell %s", shell)
114118
}

0 commit comments

Comments
 (0)