Fix completion of dir local prefixed environments

Fixes #54 by replacing the current directory path in the enviromnent
path with '.'
This commit is contained in:
Johannes Mueller
2024-03-04 17:19:05 +01:00
parent 4fce479de7
commit e9dbe2ffc4

2
_conda
View File

@@ -195,7 +195,7 @@ __conda_envs(){
# unmaned envs (if show-unammed).
if test -n "$unnamed"; then
envs+=($( (test -n "$unnamed" && cat ${HOME:?}/.conda/environments.txt) | cut -f1 -d' ' | sed -e "s|^$localenvspath/||"))
envs+=($( (test -n "$unnamed" && cat ${HOME:?}/.conda/environments.txt) | cut -f1 -d' ' | sed -e "s|^${PWD}|.|" | sed -e "s|^$localenvspath/||"))
fi
_describe $describe_opts -t envs 'conda environments' envs