We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Well we got bash. That is awesome. We might want to think about zsh.
The text was updated successfully, but these errors were encountered:
FYI kubectl handles this by wrapping the bash completion script and running sed to clean up things.
kubectl
sed
An important exceprt:
__kubectl_convert_bash_to_zsh() { sed \ -e 's/declare -F/whence -w/' \ -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")/' \ -e "s/${LWORD}_filedir${RWORD}/__kubectl_filedir/g" \ -e "s/${LWORD}_get_comp_words_by_ref${RWORD}/__kubectl_get_comp_words_by_ref/g" \ -e "s/${LWORD}__ltrim_colon_completions${RWORD}/__kubectl_ltrim_colon_completions/g" \ -e "s/${LWORD}compgen${RWORD}/__kubectl_compgen/g" \ -e "s/${LWORD}compopt${RWORD}/__kubectl_compopt/g" \ -e "s/${LWORD}declare${RWORD}/__kubectl_declare/g" \ -e "s/\\\$(type${RWORD}/\$(__kubectl_type/g" \ <<'BASH_COMPLETION_EOF' ` out.Write([]byte(zsh_initialization)) buf := new(bytes.Buffer) kubectl.GenBashCompletion(buf) out.Write(buf.Bytes()) zsh_tail := ` BASH_COMPLETION_EOF }
Maybe we could do the same here? I haven't tried it myself.
Sorry, something went wrong.
There is already code in kubectl for this, we would just need to appropriate said code :)
No branches or pull requests
Well we got bash. That is awesome. We might want to think about zsh.
The text was updated successfully, but these errors were encountered: