Skip to content

Commit

Permalink
more fixes of binary name with missing s
Browse files Browse the repository at this point in the history
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
Signed-off-by: Brittan DeYoung <32572259+brittandeyoung@users.noreply.github.com>
  • Loading branch information
khos2ow authored and brittandeyoung committed May 17, 2024
1 parent 29e186a commit 1b2dbab
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
18 changes: 13 additions & 5 deletions cmd/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,25 @@ func NewCommand() *cobra.Command {
return cmd
}

const longDescription = `Outputs terraform-doc shell completion for the given shell (bash, zsh, fish)
const longDescription = `Outputs terraform-docs shell completion for the given shell (bash, zsh, fish)
This depends on the bash-completion binary. Example installation instructions:
# for bash users
$ terraform-docs completion bash > ~/.terraform-doc-completion
$ source ~/.terraform-doc-completion
$ terraform-docs completion bash > ~/.terraform-docs-completion
$ source ~/.terraform-docs-completion
# or the one-liner below
$ source <(terraform-docs completion bash)
# for zsh users
% terraform-docs completion zsh > /usr/local/share/zsh/site-functions/_terraform-doc
% terraform-docs completion zsh > /usr/local/share/zsh/site-functions/_terraform-docs
% autoload -U compinit && compinit
# or if zsh-completion is installed via homebrew
% terraform-docs completion zsh > "${fpath[1]}/_terraform-doc"
% terraform-docs completion zsh > "${fpath[1]}/_terraform-docs"
# for ohmyzsh
$ terraform-docs completion zsh > ~/.oh-my-zsh/completions/_terraform-docs
$ omz reload
# for fish users
$ terraform-docs completion fish > ~/.config/fish/completions/terraform-docs.fish
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ omz reload
### fish

```fish
terraform-doc completion fish > ~/.config/fish/completions/terraform-docs.fish
terraform-docs completion fish > ~/.config/fish/completions/terraform-docs.fish
```

To make this change permanent, the above commands can be added to `~/.profile` file.
Expand Down
2 changes: 1 addition & 1 deletion internal/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func (r *Runtime) bindFlags(v *viper.Viper) {
switch f.Name {
case "show", "hide":
// If '--show' or '--hide' CLI flag is used, explicitly override and remove
// all items from 'show' and 'hide' set in '.terraform-doc.yml'.
// all items from 'show' and 'hide' set in '.terraform-docs.yml'.
if !sectionsCleared {
v.Set("sections.show", []string{})
v.Set("sections.hide", []string{})
Expand Down

0 comments on commit 1b2dbab

Please sign in to comment.