diff --git a/base/.profile b/base/.profile index 7d529073..060bb9c2 100755 --- a/base/.profile +++ b/base/.profile @@ -81,6 +81,19 @@ if has pip; then ;; esac 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 if has go; then