fix: autocomplete works with other binary than 'task' (#2495)

This commit is contained in:
Valentin Maerten
2025-12-07 12:20:45 +01:00
committed by GitHub
parent 12fbdd3ec7
commit 4af5278d73
4 changed files with 13 additions and 4 deletions

View File

@@ -332,21 +332,28 @@ config:
This method loads the completion script from the currently installed version of
task every time you create a new shell. This ensures that your completions are
always up-to-date.
If your executable isnt named task, set the `TASK_EXE` environment variable before running eval.
::: code-group
```shell [bash]
# ~/.bashrc
# export TASK_EXE='go-task' if needed
eval "$(task --completion bash)"
```
```shell [zsh]
# ~/.zshrc
# export TASK_EXE='go-task' if needed
eval "$(task --completion zsh)"
```
```shell [fish]
# ~/.config/fish/config.fish
# export TASK_EXE='go-task' if needed
task --completion fish | source
```