From 1b39893fcf62ea7fd96470cc85701f35604bef02 Mon Sep 17 00:00:00 2001 From: he2ss Date: Thu, 1 Jul 2021 15:03:48 +0200 Subject: [PATCH] cscli: update completion doc (fix #841) (#846) * cscli: update completion doc (fix #841) --- cmd/crowdsec-cli/completion.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/crowdsec-cli/completion.go b/cmd/crowdsec-cli/completion.go index a251d4bd8..9365edcbd 100644 --- a/cmd/crowdsec-cli/completion.go +++ b/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 + # 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: # If shell completion is not already enabled in your environment,