|
@@ -788,3 +788,44 @@ validator.
|
|
|
|
|
|
</Step>
|
|
|
</Steps>
|
|
|
+
|
|
|
+## Shell Completions
|
|
|
+
|
|
|
+Shell completions can be generated for [`bash`](#bash), [`fish`](#fish) and
|
|
|
+[`zsh`](#zsh).
|
|
|
+
|
|
|
+### Bash
|
|
|
+
|
|
|
+```shell title="Terminal"
|
|
|
+mkdir -p $HOME/.local/share/bash-completion/completions
|
|
|
+anchor completions bash > $HOME/.local/share/bash-completion/completions/anchor
|
|
|
+avm completions bash > $HOME/.local/share/bash-completion/completions/avm
|
|
|
+exec bash
|
|
|
+```
|
|
|
+
|
|
|
+### Fish
|
|
|
+
|
|
|
+```shell title="Terminal"
|
|
|
+mkdir -p $HOME/.config/fish/completions
|
|
|
+anchor completions fish > $HOME/.config/fish/completions/anchor.fish
|
|
|
+avm completions fish > $HOME/.config/fish/completions/avm.fish
|
|
|
+source $HOME/.config/fish/config.fish
|
|
|
+```
|
|
|
+
|
|
|
+### Zsh
|
|
|
+
|
|
|
+First ensure the following is in your `.zshrc` file. If using `oh-my-zsh` this
|
|
|
+step can be skipped.
|
|
|
+
|
|
|
+```shell title="Terminal"
|
|
|
+autoload -U compinit
|
|
|
+compinit -i
|
|
|
+```
|
|
|
+
|
|
|
+Next run:
|
|
|
+
|
|
|
+```shell title="Terminal"
|
|
|
+anchor completions zsh | sudo tee /usr/local/share/zsh/site-functions/_anchor
|
|
|
+avm completions zsh | sudo tee /usr/local/share/zsh/site-functions/_avm
|
|
|
+exec zsh
|
|
|
+```
|