Skip to content

Commit eb2e3b7

Browse files
committed
fix completion installing command
Signed-off-by: Yutaro Suzuki <yutaro.suzuki@cloudys.dev>
1 parent 090efce commit eb2e3b7

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

cmd/completion/completion.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ This depends on the bash-completion binary. Example installation instructions:
4848
% terraform-doc completion zsh > "${fpath[1]}/_terraform-doc"
4949
5050
# for fish users
51-
$ terraform-doc completion fish | source
51+
$ terraform-doc completion fish > ~/.config/fish/completions/terraform-docs.fish
5252
5353
Additionally, you may want to output the completion to a file and source in your .bashrc
5454
Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2

docs/user-guide/installation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,17 @@ source <(terraform-docs completion bash)
138138

139139
### zsh
140140

141-
```bash
141+
```zsh
142142
terraform-docs completion zsh > /usr/local/share/zsh/site-functions/_terraform-docs
143143
autoload -U compinit && compinit
144144
```
145145

146+
### fish
147+
148+
```fish
149+
terraform-doc completion fish > ~/.config/fish/completions/terraform-docs.fish
150+
```
151+
146152
To make this change permanent, the above commands can be added to `~/.profile` file.
147153

148154
[Chocolatey]: https://www.chocolatey.org

0 commit comments

Comments
 (0)