Skip to content

Commit

Permalink
docs: Update docs regarding tab completion
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioGasquez committed Oct 23, 2023
1 parent ea3fe81 commit f512c6f
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ Options:
```
### Completions Subcommand
For detailed instructions on how to enable tab completion, see [Enable tab completion for Bash, Fish, Zsh, or PowerShell](#enable-tab-completion-for-bash-fish-zsh-or-powershell) section.
```
Usage: espup completions [OPTIONS] <SHELL>

Expand Down Expand Up @@ -246,6 +248,42 @@ Options:
Print help (see a summary with '-h')
```
## Enable tab completion for Bash, Fish, Zsh, or PowerShell
`espup` supports generating completion scripts for Bash, Fish, Zsh, and
PowerShell. See `espup help completions` for full details, but the gist is as
simple as using one of the following:
```console
# Bash
$ espup completions bash > ~/.local/share/bash-completion/completions/espup
# Bash (macOS/Homebrew)
$ espup completions bash > $(brew --prefix)/etc/bash_completion.d/espup.bash-completion
# Fish
$ mkdir -p ~/.config/fish/completions
$ espup completions fish > ~/.config/fish/completions/espup.fish
# Zsh
$ espup completions zsh > ~/.zfunc/_espup
# PowerShell v5.0+
$ espup completions powershell >> $PROFILE.CurrentUserCurrentHost
# or
$ espup completions powershell | Out-String | Invoke-Expression
```

**Note**: you may need to restart your shell in order for the changes to take
effect.

For `zsh`, you must then add the following line in your `~/.zshrc` before
`compinit`:

```zsh
fpath+=~/.zfunc
```

## License

Licensed under either of:
Expand Down

0 comments on commit f512c6f

Please sign in to comment.