summaryrefslogtreecommitdiff
path: root/internal/askcli/command_fish.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-26 23:10:50 +0200
committerPaul Buetow <paul@buetow.org>2026-03-26 23:10:50 +0200
commitb0392db09b960e70caf73db41cc74c9182733935 (patch)
treeb570c76c311cc02545ec545620ec87f7da19df39 /internal/askcli/command_fish.go
parent5fd23315835d29f3551db2a1d10218deb95cd3de (diff)
release: v0.26.1v0.26.1
Diffstat (limited to 'internal/askcli/command_fish.go')
-rw-r--r--internal/askcli/command_fish.go22
1 files changed, 22 insertions, 0 deletions
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
+}