Skip to content

Commit

Permalink
Adjust readme with latest completions
Browse files Browse the repository at this point in the history
  • Loading branch information
LKaemmerling authored Aug 27, 2020
1 parent d5d2fec commit 7c3c1d9
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,39 @@ If you have Go installed, you can build and install the `hcloud` program with:
See `hcloud help` for a list of commands.

## Shell Completion
To load completions:

To enable shell completion, run one of the following commands (or better,
add it to your `.bashrc` or `.zshrc`):
**Bash:**
```
$ source <(hcloud completion bash)
# To load completions for each session, execute once:
Linux:
$ hcloud completion bash > /etc/bash_completion.d/hcloud
MacOS:
$ hcloud completion bash > /usr/local/etc/bash_completion.d/hcloud
```
$ source <(hcloud completion bash) # bash
$ source <(hcloud completion zsh)   # zsh

**Zsh:**
```
# If shell completion is not already enabled in your environment you will need
# to enable it. You can execute the following once:
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
If you are using antigen with zsh and completion doesn't work with the above try adding
# To load completions for each session, execute once:
$ hcloud completion zsh > "${fpath[1]}/_hcloud"
# You will need to start a new shell for this setup to take effect.
```
function _hcloud_completion {
source <(hcloud completion zsh)   # zsh
}
compctl -K _hcloud_completion hcloud

**Fish:**
```
instead.
$ hcloud completion fish | source
# To load completions for each session, execute once:
$ hcloud completion fish > ~/.config/fish/completions/hcloud.fish
```

## Output configuration

Expand Down

0 comments on commit 7c3c1d9

Please sign in to comment.