From 61e08c63374406f261c914e667092eb21c13c37b Mon Sep 17 00:00:00 2001 From: Alexandre Garnier Date: Wed, 19 May 2021 08:59:09 +0200 Subject: [PATCH] Improve markdown rendering of commands help for shell completion Cf. https://github.com/helm/helm-www/pull/1100 Signed-off-by: Alexandre Garnier --- cmd/helm/completion.go | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/cmd/helm/completion.go b/cmd/helm/completion.go index 5aea0592e..880e77c57 100644 --- a/cmd/helm/completion.go +++ b/cmd/helm/completion.go @@ -33,33 +33,41 @@ const bashCompDesc = ` Generate the autocompletion script for Helm for the bash shell. To load completions in your current shell session: -$ source <(helm completion bash) + + source <(helm completion bash) To load completions for every new session, execute once: -Linux: - $ helm completion bash > /etc/bash_completion.d/helm -MacOS: - $ helm completion bash > /usr/local/etc/bash_completion.d/helm +- Linux: + + helm completion bash > /etc/bash_completion.d/helm + +- MacOS: + + helm completion bash > /usr/local/etc/bash_completion.d/helm ` const zshCompDesc = ` Generate the autocompletion script for Helm for the zsh shell. To load completions in your current shell session: -$ source <(helm completion zsh) + + source <(helm completion zsh) To load completions for every new session, execute once: -$ helm completion zsh > "${fpath[1]}/_helm" + + helm completion zsh > "${fpath[1]}/_helm" ` const fishCompDesc = ` Generate the autocompletion script for Helm for the fish shell. To load completions in your current shell session: -$ helm completion fish | source + + helm completion fish | source To load completions for every new session, execute once: -$ helm completion fish > ~/.config/fish/completions/helm.fish + + helm completion fish > ~/.config/fish/completions/helm.fish You will need to start a new shell for this setup to take effect. `