From f8fdd173832c65ef5c7d97a8bccb32f1ba567038 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 7 May 2020 17:04:14 -0400 Subject: [PATCH] Complete command names even if ValidArgs present (#1088) Signed-off-by: Marc Khouzam --- bash_completions.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bash_completions.go b/bash_completions.go index 1e27188c..d8341cc4 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -181,10 +181,9 @@ __%[1]s_handle_reply() local completions completions=("${commands[@]}") if [[ ${#must_have_one_noun[@]} -ne 0 ]]; then - completions=("${must_have_one_noun[@]}") + completions+=("${must_have_one_noun[@]}") elif [[ -n "${has_completion_function}" ]]; then # if a go completion function is provided, defer to that function - completions=() __%[1]s_handle_go_custom_completion fi if [[ ${#must_have_one_flag[@]} -ne 0 ]]; then