mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-10-20 04:25:20 +08:00
Remove path prefix from environments in default location
This commit is contained in:
@@ -141,7 +141,7 @@ __conda_envs(){
|
|||||||
local -a envs
|
local -a envs
|
||||||
# only parse environments.txt (including unnamed envs) if asked by the user
|
# only parse environments.txt (including unnamed envs) if asked by the user
|
||||||
zstyle -s ":conda_zsh_completion:*" show-unnamed tmp
|
zstyle -s ":conda_zsh_completion:*" show-unnamed tmp
|
||||||
envs=($(echo base && ls -1 ${${CONDA_EXE}%bin/conda}/envs && (test -n "$tmp" && cat ${HOME:?}/.conda/environments.txt) | cut -f1 -d' '))
|
envs=($(echo base && ls -1 ${${CONDA_EXE}%bin/conda}/envs && (test -n "$tmp" && cat ${HOME:?}/.conda/environments.txt) | cut -f1 -d' ' | sed -e "s|^${HOME:?}/.conda/envs/||"))
|
||||||
_describe -t envs 'conda environments' envs
|
_describe -t envs 'conda environments' envs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user