Просмотр исходного кода

cscli: update completion doc (fix #841) (#846)

* cscli: update completion doc (fix #841)
he2ss 4 лет назад
Родитель
Сommit
1b39893fcf
1 измененных файлов с 7 добавлено и 0 удалено
  1. 7 0
      cmd/crowdsec-cli/completion.go

+ 7 - 0
cmd/crowdsec-cli/completion.go

@@ -28,6 +28,13 @@ func NewCompletionCmd() *cobra.Command {
 
 
   $ cscli completion bash | sudo tee /usr/local/etc/bash_completion.d/cscli
   $ cscli completion bash | sudo tee /usr/local/etc/bash_completion.d/cscli
 
 
+  # Troubleshoot:
+  If you have this error (bash: _get_comp_words_by_ref: command not found), it seems that you need "bash-completion" dependency :
+
+  * Install bash-completion package
+  $ source /etc/profile
+  $ source <(cscli completion bash)
+
 ### Zsh:
 ### Zsh:
 
 
   # If shell completion is not already enabled in your environment,
   # If shell completion is not already enabled in your environment,