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 {
3535 return cmd
3636}
3737
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)
3939This depends on the bash-completion binary. Example installation instructions:
4040# 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)
4347
4448# 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
4650 % autoload -U compinit && compinit
4751# 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
4957
5058# for fish users
5159 $ terraform-docs completion fish > ~/.config/fish/completions/terraform-docs.fish
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ omz reload
153153### fish
154154
155155``` fish
156- terraform-doc completion fish > ~/.config/fish/completions/terraform-docs.fish
156+ terraform-docs completion fish > ~/.config/fish/completions/terraform-docs.fish
157157```
158158
159159To 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) {
214214 switch f .Name {
215215 case "show" , "hide" :
216216 // 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'.
218218 if ! sectionsCleared {
219219 v .Set ("sections.show" , []string {})
220220 v .Set ("sections.hide" , []string {})
You can’t perform that action at this time.
0 commit comments