From 64bf400ab468060411e0b9fb83c99c06fb958eca Mon Sep 17 00:00:00 2001 From: Rick Date: Tue, 8 Oct 2019 10:37:09 +0800 Subject: [PATCH] Add jcli completion description --- app/cmd/completion.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/app/cmd/completion.go b/app/cmd/completion.go index cab0d23..46a8ec3 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()) }, -- GitLab