From b0392db09b960e70caf73db41cc74c9182733935 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 26 Mar 2026 23:10:50 +0200 Subject: release: v0.26.1 --- internal/askcli/command_fish.go | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 internal/askcli/command_fish.go (limited to 'internal/askcli/command_fish.go') diff --git a/internal/askcli/command_fish.go b/internal/askcli/command_fish.go new file mode 100644 index 0000000..89a8457 --- /dev/null +++ b/internal/askcli/command_fish.go @@ -0,0 +1,22 @@ +package askcli + +import ( + "fmt" + "io" + "os" +) + +func (d Dispatcher) handleFish(args []string, stdout, stderr io.Writer) (int, error) { + if len(args) != 1 { + fmt.Fprintln(stderr, "usage: ask fish") + return 1, nil + } + binaryPath, err := os.Executable() + if err != nil { + binaryPath = "ask" + } + if _, err := io.WriteString(stdout, FishCompletionFor(binaryPath)); err != nil { + return 1, err + } + return 0, nil +} -- cgit v1.2.3