vscode-dev-containers icon indicating copy to clipboard operation
vscode-dev-containers copied to clipboard

[kubernetes-helm] zsh completion is not working

Open ijaouani opened this issue 2 years ago • 2 comments

  • VSCode Version: 1.68.1
  • Local OS Version: Windows 11 21H2 (OS Build 22000.739)
  • Local chip architecture: x64
  • Reproduces in: Remote - Containers
  • Name of Dev Container Definition with Issue: kubernetes-helm

Steps to Reproduce:

  1. Create an empty folder locally

  2. Open the folder with vscode and apply "Kubernetes - Local Configuration" without any features image

  3. Reopen in container

  4. Wait for it to build

  5. Open a zsh terminal

  6. Write "kubectl g" and tab

  7. Nothing happen

Investigations :

  1. Bash completion is working
  2. The relevant code is in kubectl-helm-debian.sh :
# kubectl bash completion
kubectl completion bash > /etc/bash_completion.d/kubectl

# kubectl zsh completion
if [ -e "${USERHOME}}/.oh-my-zsh" ]; then
    mkdir -p "${USERHOME}/.oh-my-zsh/completions"
    kubectl completion zsh > "${USERHOME}/.oh-my-zsh/completions/_kubectl"
    chown -R "${USERNAME}" "${USERHOME}/.oh-my-zsh"
fi
  1. We don't enter the if statement (I have checked with echo) that's why it's not working.
  2. I can reproduce the same issue when creating a devcontainer using Ubuntu definition and using the feature :
"features": {
		"kubectl-helm-minikube": {
			"version": "latest",
			"helm": "latest",
			"minikube": "none"
		},
}

ijaouani avatar Jun 22 '22 09:06 ijaouani

Thanks for opening @ijaouani. Upon initial read, it sounds like this could be an issue with the Remote-Containers extension specifically?

cc @chrmarti @joshspicer for thoughts

bamurtaugh avatar Jun 27 '22 17:06 bamurtaugh

For me this is just a bug here.

ijaouani avatar Jun 28 '22 11:06 ijaouani