summaryrefslogtreecommitdiff
path: root/docs/fish-completion.md
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 /docs/fish-completion.md
parent5fd23315835d29f3551db2a1d10218deb95cd3de (diff)
release: v0.26.1v0.26.1
Diffstat (limited to 'docs/fish-completion.md')
-rw-r--r--docs/fish-completion.md22
1 files changed, 16 insertions, 6 deletions
diff --git a/docs/fish-completion.md b/docs/fish-completion.md
index 10966e9..195d29a 100644
--- a/docs/fish-completion.md
+++ b/docs/fish-completion.md
@@ -1,21 +1,31 @@
# Fish Completion
-Hexai ships a Fish completion file for the `ask` task-management CLI at [`assets/ask.fish`](../assets/ask.fish).
+The `ask` task-management CLI embeds its Fish completion script in the binary and prints it with `ask fish`.
It completes the top-level `ask` subcommands and the nested `ask dep` operations.
It also completes task UUIDs for UUID-taking commands by reading the current project from `ask all --json` and filtering out completed and deleted tasks.
The script preserves the global `--json` flag.
-Install it into Fish's completion directory:
+Load it into the current Fish session:
```sh
-install -Dm644 assets/ask.fish ~/.config/fish/completions/ask.fish
+ask fish | source
```
-If you use a custom XDG config directory, copy it to:
+If you installed with `mage install` and `~/go/bin` is not on your `PATH` yet, use:
```sh
-$XDG_CONFIG_HOME/fish/completions/ask.fish
+~/go/bin/ask fish | source
```
-The completion file is static and ships with the repository, so it does not require a build step.
+To enable it automatically for new Fish sessions, add this to your Fish config or a file in `~/.config/fish/conf.d/`:
+
+```fish
+set -l ask_bin ~/go/bin/ask
+
+if test -x $ask_bin
+ $ask_bin fish | source
+end
+```
+
+No external `ask.fish` file is required.