Auto-update bash completions for kubectl, minikube and helm

This bash completion script ensures that you always get the matching bash completions for the installed kubectl, minikube and helm. Simply source it and it will do the rest.
#!/bin/bash
if command -v minikube >/dev/null 2>&1; then
source <(minikube completion bash)
echo "You may want to run"
echo "source <(minikube docker-env)"
fi
if command -v kubectl >/dev/null 2>&1; then
source <(kubectl completion bash)
fi
if command -v helm >/dev/null 2>&1; then
source <(helm completion bash)
fi
0 comments
Reply