zsh: conda environment name auto-completion not working even after installing conda-zsh-completion
0
votes
0
answers
57
views
I'm trying to set up auto-completion for conda environment names in zsh on WSL. I've followed these steps:
1. Cloned conda-zsh-completion:
mkdir -p ~/zsh-plugins
cd ~/zsh-plugins
git clone https://github.com/conda-incubator/conda-zsh-completion
2. Added to my ~/.zshrc:
plugins+=(conda-zsh-completion)
autoload -U compinit && compinit
# conda-zsh-completion
if [ $commands[conda] ]; then
eval "$(conda shell.zsh hook)"
fi
3. Sourced ~/.zshrc
However, auto-completion for conda environment names still doesn't work. For example, when I type conda activate x
and press Tab, it doesn't auto-complete to xyj_env
, even though that's the only environment starting with 'x'.
When I source ~/.zshrc, I get this error:
compinit:503: no such file or directory: /usr/share/zsh/vendor-completions/_docker
But I believe this is unrelated to the conda completion issue.
How can I get conda environment name auto-completion working in zsh?
Asked by XYJ
(1 rep)
Mar 5, 2025, 03:48 AM