Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document completion installation #906

Merged
merged 1 commit into from
Oct 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 62 additions & 1 deletion docs/docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ choco install go-task

This installation method is community owned.


### Scoop

If you're on Windows and have [Scoop][scoop] installed, getting
Expand Down Expand Up @@ -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/
[snapcraft]: https://snapcraft.io/task
[homebrew]: https://brew.sh/
Expand Down