[#1041] autocomplete: beautify help message
Indent sections corresponding to different shells for faster navigation and remove `#` at the line beginning. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
efabffbfd0
commit
c01acba3ce
1 changed files with 16 additions and 20 deletions
|
@ -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
|
||||
|
||||
# If shell completion is not already enabled in your environment you will need
|
||||
# to enable it. You can execute the following once:
|
||||
To load completions for each session, execute once:
|
||||
$ %s completion zsh > "${fpath[1]}/_%s"
|
||||
|
||||
$ 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.
|
||||
You will need to start a new shell for this setup to take effect.
|
||||
|
||||
Fish:
|
||||
$ %s completion fish | source
|
||||
|
||||
$ %s completion fish | source
|
||||
|
||||
# To load completions for each session, execute once:
|
||||
$ %s completion fish > ~/.config/fish/completions/%s.fish
|
||||
To load completions for each session, execute once:
|
||||
$ %s completion fish > ~/.config/fish/completions/%s.fish
|
||||
`
|
||||
|
||||
// Command returns cobra command structure for autocomplete routine.
|
||||
|
|
Loading…
Reference in a new issue