소스 검색

Adapt conda.bash for bash associative array

pull/2027/head
Sakuragawa Misty 4 년 전
부모
커밋
351ddb1095
1개의 변경된 파일16개의 추가작업 그리고 8개의 파일을 삭제
  1. +16
    -8
      pyenv.d/rehash/conda.bash

+ 16
- 8
pyenv.d/rehash/conda.bash 파일 보기

@ -34,14 +34,22 @@ make_shims() {
}
deregister_conda_shims() {
local shim
local shims=()
for shim in ${registered_shims}; do
if ! conda_shim "${shim}" 1>&2; then
shims[${#shims[*]}]="${shim}"
fi
done
registered_shims=" ${shims[@]} "
if [[ -v registered_shims[@] ]]; then # adapted for Bash 4.x's associative array (#1749)
for shim in ${!registered_shims[*]}; do
if conda_shim "${shim}" 1>&2; then
unset registered_shims[${shim}]
fi
done
else
local shim
local shims=()
for shim in ${registered_shims}; do
if ! conda_shim "${shim}" 1>&2; then
shims[${#shims[*]}]="${shim}"
fi
done
registered_shims=" ${shims[@]} "
fi
}
if conda_exists; then

불러오는 중...
취소
저장