diff --git a/app/cmd/completion.go b/app/cmd/completion.go index cab0d238cd36e7f874a421039452eaabed0b6e03..46a8ec3d160f84964b5c891bd22cf1dace1ece66 100644 --- a/app/cmd/completion.go +++ b/app/cmd/completion.go @@ -11,11 +11,15 @@ func init() { var completionCmd = &cobra.Command{ Use: "completion", Short: "Genereate bash completion scripts", - Long: `To load completion run: - jcli completion >> ~.bash_completion - -If you get trouble, please visit https://github.com/jenkins-zh/jenkins-cli/issues/83. -`, + Long: `Genereate bash completion scripts`, + Example: `# Installing bash completion on macOS using homebrew + ## If running Bash 3.2 included with macOS + brew install bash-completion + ## or, if running Bash 4.1+ + brew install bash-completion@2 + ## you may need add the completion to your completion directory + kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl + ## If you get trouble, please visit https://github.com/jenkins-zh/jenkins-cli/issues/83.`, Run: func(cmd *cobra.Command, _ []string) { rootCmd.GenBashCompletion(cmd.OutOrStdout()) },