mirror of
https://github.com/conda-incubator/conda-zsh-completion.git
synced 2026-10-20 04:25:20 +08:00
co-authored by
Jannis Leidel
parent
bf50ae88e2
commit
afe984228b
@@ -171,14 +171,14 @@ __conda_envs(){
|
|||||||
globalenvs+=("base")
|
globalenvs+=("base")
|
||||||
|
|
||||||
# local envs (if exists).
|
# local envs (if exists).
|
||||||
if [[ -n $CONDA_ENVS_PATH ]]; then
|
if [[ -n "$CONDA_ENVS_PATH" ]]; then
|
||||||
localenvspath=$CONDA_ENVS_PATH
|
localenvspath="$CONDA_ENVS_PATH"
|
||||||
elif [[ -n $CONDA_ENVS_DIRS ]]; then
|
elif [[ -n "$CONDA_ENVS_DIRS" ]]; then
|
||||||
localenvspath=$CONDA_ENVS_DIRS
|
localenvspath="$CONDA_ENVS_DIRS"
|
||||||
else
|
else
|
||||||
localenvspath=${HOME:?}/.conda/envs
|
localenvspath="${HOME:?}/.conda/envs"
|
||||||
fi
|
fi
|
||||||
localenvs=($([[ -d $localenvspath ]] && ls $ls_opts $localenvspath))
|
localenvs=($([[ -d "$localenvspath" ]] && ls $ls_opts "$localenvspath"))
|
||||||
|
|
||||||
if test -n "$globalfirst"; then
|
if test -n "$globalfirst"; then
|
||||||
envs=($globalenvs $localenvs)
|
envs=($globalenvs $localenvs)
|
||||||
|
|||||||
Reference in New Issue
Block a user