Skip to content
Myr

feat: improve completions help formatting (#1444)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Carlos Alexandro Becker · committed by GitHub · parent d298d79 · Browse files · 1 file+25 added−13 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Signed-off-by: Carlos A Becker <caarlos0@gmail.com>

Diff stats

1 file+25 added−13 removed

  • other:+25 added−13 removed

1 file+25 added−13 removed

modified:completions.go+25 added-13 removed
620 unmodified lines
621This script depends on the 'bash-completion' package.622If it is not installed already, you can install it via your OS's package manager.623624To load completions in your current shell session:625$ source <(%[1]s completion bash)625626 source <(%[1]s completion bash)627628To load completions for every new session, execute once:628Linux:629 $ %[1]s completion bash > /etc/bash_completion.d/%[1]s630MacOS:631 $ %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s629630#### Linux:631632 %[1]s completion bash > /etc/bash_completion.d/%[1]s633634#### macOS:635636 %[1]s completion bash > /usr/local/etc/bash_completion.d/%[1]s637638You will need to start a new shell for this setup to take effect.639 `, c.Root().Name()),640 Args: NoArgs,641 DisableFlagsInUseLine: true,
14 unmodified lines
656657If shell completion is not already enabled in your environment you will need658to enable it. You can execute the following once:659655$ echo "autoload -U compinit; compinit" >> ~/.zshrc660 echo "autoload -U compinit; compinit" >> ~/.zshrc661662To load completions for every new session, execute once:658# Linux:659$ %[1]s completion zsh > "${fpath[1]}/_%[1]s"660# macOS:661$ %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s663664#### Linux:665666 %[1]s completion zsh > "${fpath[1]}/_%[1]s"667668#### macOS:669670 %[1]s completion zsh > /usr/local/share/zsh/site-functions/_%[1]s671672You will need to start a new shell for this setup to take effect.673`, c.Root().Name()),674 Args: NoArgs,675 ValidArgsFunction: NoFileCompletions,
14 unmodified lines
690 Long: fmt.Sprintf(`691Generate the autocompletion script for the fish shell.692693To load completions in your current shell session:685$ %[1]s completion fish | source694695 %[1]s completion fish | source696697To load completions for every new session, execute once:688$ %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish698699 %[1]s completion fish > ~/.config/fish/completions/%[1]s.fish700701You will need to start a new shell for this setup to take effect.702`, c.Root().Name()),703 Args: NoArgs,704 ValidArgsFunction: NoFileCompletions,
11 unmodified lines
716 Long: fmt.Sprintf(`717Generate the autocompletion script for powershell.718719To load completions in your current shell session:709PS C:\> %[1]s completion powershell | Out-String | Invoke-Expression720721 %[1]s completion powershell | Out-String | Invoke-Expression722723To load completions for every new session, add the output of the above command724to your powershell profile.725`, c.Root().Name()),726 Args: NoArgs,
77 unmodified lines