.dotfiles/.local/share/bash-completion/completions/kns
2024-07-02 14:26:32 +02:00

8 lines
232 B
Plaintext

function _kns() {
[ "$COMP_CWORD" -ne 1 ] && return
mapfile -t COMPREPLY < <(compgen -W \
"$(kubectl get namespace -o jsonpath='{..metadata.name}')" \
-- "${COMP_WORDS[1]}")
}
complete -o nospace -F _kns kns