Skip to content

Commit

Permalink
update zsh completion docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jackwrfuller committed Dec 12, 2024
1 parent 0c1dd14 commit 842e14e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,21 @@ sudo wget -q https://github.com/ahoy-cli/ahoy/releases/download/2.0.0/ahoy-bin-`
```

### Bash / Zsh Completion
For Zsh, Just add this to your ~/.zshrc, and your completions will be relative to the directory you're in.
For Zsh, there are two options. If you are using Oh-My-Zsh, you can install our custom plugin by downloading the `autocomplete/zsh/ahoy` folder and placing it in the Oh-My-Zsh custom plugin folder,
usually located at `~/.oh-my-zsh/custom/plugin`. Then you must enable it in your `./zshrc`:

`complete -F "ahoy --generate-bash-completion" ahoy`
```
plugins=(
# other plugins...
ahoy
)
```
Alternatively, if you don't use Oh-My-Zsh you can save the `autocomplete/zsh/ahoy-zsh-autocomplete` file somewhere and source it in your `~/.zshrc`:

```
source /path/to/ahoy-zsh-autocomplete
```

For Bash, you'll need to make sure you have bash-completion installed and setup. On OSX with homebrew it looks like this:

Expand Down

0 comments on commit 842e14e

Please sign in to comment.