Add automatic kubectl completion

This commit is contained in:
Salt 2021-03-01 14:53:19 -06:00
parent 10b8ddb1f2
commit 1d6dab2107

View File

@ -81,6 +81,19 @@ if has pip; then
;; ;;
esac esac
fi fi
if has kubectl; then
case "$_baseshell" in
*bash)
if ! [ -f "$HOME/.kubectl-completion-bash" ]; then
kubectl completion bash > "$HOME/.kubectl-completion-bash"
echo ".profile: Created kubectl completion for bash"
fi
. "$HOME/.kubectl-completion-bash"
;;
*)
;;
esac
fi
# Set up go, if we have it # Set up go, if we have it
if has go; then if has go; then