diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-26 23:10:50 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-26 23:10:50 +0200 |
| commit | b0392db09b960e70caf73db41cc74c9182733935 (patch) | |
| tree | b570c76c311cc02545ec545620ec87f7da19df39 /docs | |
| parent | 5fd23315835d29f3551db2a1d10218deb95cd3de (diff) | |
release: v0.26.1v0.26.1
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/buildandinstall.md | 2 | ||||
| -rw-r--r-- | docs/fish-completion.md | 22 |
2 files changed, 17 insertions, 7 deletions
diff --git a/docs/buildandinstall.md b/docs/buildandinstall.md index 7e63ada..a707faa 100644 --- a/docs/buildandinstall.md +++ b/docs/buildandinstall.md @@ -11,7 +11,7 @@ Hexai uses Mage for developer tasks. Install Mage, then run targets like build, - In restricted sandboxes/CI (no sockets), skip network-based tests: - `HEXAI_TEST_SKIP_NET=1 go test ./... -cover` - Install binaries to `GOPATH/bin`: `mage install` -- Install Fish completions: `install -Dm644 assets/ask.fish ~/.config/fish/completions/ask.fish` +- Load Fish completions in the current shell: `~/go/bin/ask fish | source` Note: `mage lint` uses `golangci-lint`. Install via `mage devinstall` if needed. 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. |
