dotfiles/.local/share/bash-completion/completions/kctx
2025-06-17 05:13:23 +00:00

10 lines
224 B
Bash

# vim: ft=bash
_kctx() {
[ "$COMP_CWORD" -ne 1 ] && return
mapfile -t COMPREPLY < <(compgen -W \
"$(kubectl config get-contexts -o name)" \
-- "${COMP_WORDS[1]}")
}
complete -o nospace -F _kctx kctx