mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
Merge pull request #906 from viconnex/add-completion-documentation
Document completion installation
This commit is contained in:
@@ -39,7 +39,6 @@ choco install go-task
|
|||||||
|
|
||||||
This installation method is community owned.
|
This installation method is community owned.
|
||||||
|
|
||||||
|
|
||||||
### Scoop
|
### Scoop
|
||||||
|
|
||||||
If you're on Windows and have [Scoop][scoop] installed, getting
|
If you're on Windows and have [Scoop][scoop] installed, getting
|
||||||
@@ -190,6 +189,68 @@ released binary.
|
|||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
## Setup completions
|
||||||
|
|
||||||
|
Download the autocompletion file corresponding to your shell.
|
||||||
|
|
||||||
|
[All completions are available on the task repository](https://github.com/go-task/task/tree/master/completion).
|
||||||
|
|
||||||
|
### bash
|
||||||
|
|
||||||
|
First, ensure that you installed bash-completion using your package manager.
|
||||||
|
|
||||||
|
Make the completion file executable:
|
||||||
|
|
||||||
|
```
|
||||||
|
chmod +x path/to/task.bash
|
||||||
|
```
|
||||||
|
|
||||||
|
After, add this to your ~/.bash_profile:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
source path/to/task.bash
|
||||||
|
```
|
||||||
|
|
||||||
|
### zsh
|
||||||
|
|
||||||
|
Put the `_task` file somewhere in your `$fpath`:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mv path/to/_task /usr/local/share/zsh/site-functions/_task
|
||||||
|
```
|
||||||
|
|
||||||
|
Ensure that the following is present in your ~/.zshrc:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
autoload -U compinit
|
||||||
|
compinit -i
|
||||||
|
```
|
||||||
|
|
||||||
|
Zsh version 5.7 or later is recommended.
|
||||||
|
|
||||||
|
### fish
|
||||||
|
|
||||||
|
Move the `task.fish` completion script:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
mv path/to/task.fish ~/.config/fish/completions/task.fish
|
||||||
|
```
|
||||||
|
|
||||||
|
### PowerShell
|
||||||
|
|
||||||
|
Open your profile script with:
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir -Path (Split-Path -Parent $profile) -ErrorAction SilentlyContinue
|
||||||
|
notepad $profile
|
||||||
|
```
|
||||||
|
|
||||||
|
Add the line and save the file:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
Invoke-Expression -Command path/to/task.ps1
|
||||||
|
```
|
||||||
|
|
||||||
[go]: https://golang.org/
|
[go]: https://golang.org/
|
||||||
[snapcraft]: https://snapcraft.io/task
|
[snapcraft]: https://snapcraft.io/task
|
||||||
[homebrew]: https://brew.sh/
|
[homebrew]: https://brew.sh/
|
||||||
|
Reference in New Issue
Block a user