File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,25 @@ func NewCommand() *cobra.Command {
35
35
return cmd
36
36
}
37
37
38
- const longDescription = `Outputs terraform-doc shell completion for the given shell (bash, zsh, fish)
38
+ const longDescription = `Outputs terraform-docs shell completion for the given shell (bash, zsh, fish)
39
39
This depends on the bash-completion binary. Example installation instructions:
40
40
# for bash users
41
- $ terraform-docs completion bash > ~/.terraform-doc-completion
42
- $ source ~/.terraform-doc-completion
41
+ $ terraform-docs completion bash > ~/.terraform-docs-completion
42
+ $ source ~/.terraform-docs-completion
43
+
44
+ # or the one-liner below
45
+
46
+ $ source <(terraform-docs completion bash)
43
47
44
48
# for zsh users
45
- % terraform-docs completion zsh > /usr/local/share/zsh/site-functions/_terraform-doc
49
+ % terraform-docs completion zsh > /usr/local/share/zsh/site-functions/_terraform-docs
46
50
% autoload -U compinit && compinit
47
51
# or if zsh-completion is installed via homebrew
48
- % terraform-docs completion zsh > "${fpath[1]}/_terraform-doc"
52
+ % terraform-docs completion zsh > "${fpath[1]}/_terraform-docs"
53
+
54
+ # for ohmyzsh
55
+ $ terraform-docs completion zsh > ~/.oh-my-zsh/completions/_terraform-docs
56
+ $ omz reload
49
57
50
58
# for fish users
51
59
$ terraform-docs completion fish > ~/.config/fish/completions/terraform-docs.fish
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ autoload -U compinit && compinit
146
146
### fish
147
147
148
148
``` fish
149
- terraform-doc completion fish > ~/.config/fish/completions/terraform-docs.fish
149
+ terraform-docs completion fish > ~/.config/fish/completions/terraform-docs.fish
150
150
```
151
151
152
152
To make this change permanent, the above commands can be added to ` ~/.profile ` file.
Original file line number Diff line number Diff line change @@ -214,7 +214,7 @@ func (r *Runtime) bindFlags(v *viper.Viper) {
214
214
switch f .Name {
215
215
case "show" , "hide" :
216
216
// If '--show' or '--hide' CLI flag is used, explicitly override and remove
217
- // all items from 'show' and 'hide' set in '.terraform-doc .yml'.
217
+ // all items from 'show' and 'hide' set in '.terraform-docs .yml'.
218
218
if ! sectionsCleared {
219
219
v .Set ("sections.show" , []string {})
220
220
v .Set ("sections.hide" , []string {})
You can’t perform that action at this time.
0 commit comments