diff --git a/pkg/util/autocomplete/autocomplete.go b/pkg/util/autocomplete/autocomplete.go index 5d9083c0..7f0e0c1b 100644 --- a/pkg/util/autocomplete/autocomplete.go +++ b/pkg/util/autocomplete/autocomplete.go @@ -10,33 +10,29 @@ import ( const longHelpTemplate = `To load completions: Bash: + $ source <(%s completion bash) -$ source <(%s completion bash) - -# To load completions for each session, execute once: -Linux: + To load completions for each session, execute once: + Linux: $ %s completion bash > /etc/bash_completion.d/%s -MacOS: + MacOS: $ %s completion bash > /usr/local/etc/bash_completion.d/%s 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 - -# To load completions for each session, execute once: -$ %s completion zsh > "${fpath[1]}/_%s" - -# You will need to start a new shell for this setup to take effect. + 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 + + To load completions for each session, execute once: + $ %s completion zsh > "${fpath[1]}/_%s" + + You will need to start a new shell for this setup to take effect. Fish: - -$ %s completion fish | source - -# To load completions for each session, execute once: -$ %s completion fish > ~/.config/fish/completions/%s.fish + $ %s completion fish | source + + To load completions for each session, execute once: + $ %s completion fish > ~/.config/fish/completions/%s.fish ` // Command returns cobra command structure for autocomplete routine.