This should be working on Ubuntu together with bash.
bash-completionsshould be installedkubectlshould be installed
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.shkubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/nullecho 'alias k=kubectl' >> ~/.bashrcecho 'complete -o default -F __start_kubectl k' >> ~/.bashrchelm completion bash | sudo tee /etc/bash_completion.d/helm > /dev/null