update completion docs to make source path clear
This commit is contained in:
parent
ae6471792b
commit
71718c267c
1 changed files with 6 additions and 4 deletions
|
@ -10,21 +10,23 @@ eval "$(_HPI_COMPLETE=fish_source hpi)" # in ~/.config/fish/config.fish
|
||||||
|
|
||||||
That is slightly slower since its generating the completion code on the fly -- see [click docs](https://click.palletsprojects.com/en/8.0.x/shell-completion/#enabling-completion) for more info
|
That is slightly slower since its generating the completion code on the fly -- see [click docs](https://click.palletsprojects.com/en/8.0.x/shell-completion/#enabling-completion) for more info
|
||||||
|
|
||||||
To use the completions here:
|
To use the generated completion files in this repository, you need to source the file in `./bash`, `./zsh`, or `./fish` depending on your shell.
|
||||||
|
|
||||||
|
If you don't have HPI cloned locally, after installing `HPI` you can generate the file yourself using one of the commands above. For example, for `bash`: `_HPI_COMPLETE=bash_source hpi > ~/.config/hpi_bash_completion`, and then source it like `source ~/.config/hpi_bash_completion`
|
||||||
|
|
||||||
### bash
|
### bash
|
||||||
|
|
||||||
Put `source /path/to/bash/_hpi` in your `~/.bashrc`
|
Put `source /path/to/hpi/repo/misc/completion/bash/_hpi` in your `~/.bashrc`
|
||||||
|
|
||||||
### zsh
|
### zsh
|
||||||
|
|
||||||
You can either source the file:
|
You can either source the file:
|
||||||
|
|
||||||
`source /path/to/zsh/_hpi`
|
`source /path/to/hpi/repo/misc/completion/zsh/_hpi`
|
||||||
|
|
||||||
..or add the directory to your `fpath` to load it lazily:
|
..or add the directory to your `fpath` to load it lazily:
|
||||||
|
|
||||||
`fpath=("/path/to/zsh/" "${fpath[@]}")` (Note: the directory, not the script `_hpi`)
|
`fpath=("/path/to/hpi/repo/misc/completion/zsh/" "${fpath[@]}")` (Note: the directory, not the script `_hpi`)
|
||||||
|
|
||||||
If your zsh configuration doesn't automatically run `compinit`, after modifying your `fpath` you should:
|
If your zsh configuration doesn't automatically run `compinit`, after modifying your `fpath` you should:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue