未验证 提交 eaa5acf5 编写于 作者: LinuxSuRen's avatar LinuxSuRen 提交者: GitHub

Merge pull request #188 from LinuxSuRen/fix/completion-desc

Add jcli completion description
...@@ -11,11 +11,15 @@ func init() { ...@@ -11,11 +11,15 @@ func init() {
var completionCmd = &cobra.Command{ var completionCmd = &cobra.Command{
Use: "completion", Use: "completion",
Short: "Genereate bash completion scripts", Short: "Genereate bash completion scripts",
Long: `To load completion run: Long: `Genereate bash completion scripts`,
jcli completion >> ~.bash_completion Example: `# Installing bash completion on macOS using homebrew
## If running Bash 3.2 included with macOS
If you get trouble, please visit https://github.com/jenkins-zh/jenkins-cli/issues/83. 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) { Run: func(cmd *cobra.Command, _ []string) {
rootCmd.GenBashCompletion(cmd.OutOrStdout()) rootCmd.GenBashCompletion(cmd.OutOrStdout())
}, },
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册