From 136c90a7bfb0a1d0e6389663e18dd3aabdf5029d Mon Sep 17 00:00:00 2001 From: elipapa Date: Mon, 5 Dec 2016 12:39:40 +0000 Subject: [PATCH] solving unknown file attribute error while sourcing completions sourcing the file with `zsh` > 4 resulted in an `unknown file attribute`. More details at http://stackoverflow.com/questions/37220495/zsh-unknown-file-attribute replacing $@ with $* for get_comp_words as suggested by @sttts worked to resolve the issue --- pkg/kubectl/cmd/completion.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/kubectl/cmd/completion.go b/pkg/kubectl/cmd/completion.go index 3ea022113cc..33ecf4eb85d 100644 --- a/pkg/kubectl/cmd/completion.go +++ b/pkg/kubectl/cmd/completion.go @@ -271,6 +271,7 @@ fi __kubectl_convert_bash_to_zsh() { sed \ -e 's/declare -F/whence -w/' \ + -e 's/_get_comp_words_by_ref "\$@"/_get_comp_words_by_ref "\$*"/' \ -e 's/local \([a-zA-Z0-9_]*\)=/local \1; \1=/' \ -e 's/flags+=("\(--.*\)=")/flags+=("\1"); two_word_flags+=("\1")/' \ -e 's/must_have_one_flag+=("\(--.*\)=")/must_have_one_flag+=("\1")/' \