ソースを参照

Move `conda.txt` and `source.txt` into their directory to allow users to have custom blacklist

pull/953/head
Yamashita, Yuu 7年前
コミット
753a9e826b
7個のファイルの変更20行の追加5行の削除
  1. +4
    -2
      pyenv.d/rehash/conda.bash
  2. +3
    -0
      pyenv.d/rehash/conda.d/.gitignore
  3. +0
    -0
      pyenv.d/rehash/conda.d/default.list
  4. +4
    -2
      pyenv.d/rehash/source.bash
  5. +3
    -0
      pyenv.d/rehash/source.d/.gitignore
  6. +6
    -0
      pyenv.d/rehash/source.d/default.list
  7. +0
    -1
      pyenv.d/rehash/source.txt

+ 4
- 2
pyenv.d/rehash/conda.bash ファイルの表示

@ -12,11 +12,13 @@ conda_exists() {
}
shims=()
for shim in $(cat "${BASH_SOURCE%/*}/conda.txt"); do
if [ -n "${shim%%#*}" ]; then
shopt -s nullglob
for shim in $(cat "${BASH_SOURCE%/*}/conda.d/"*".list" | sort | uniq | sed -e 's/#.*$//' | sed -e '/^[[:space:]]*$/d'); do
if [ -n "${shim##*/}" ]; then
shims[${#shims[*]}]="${shim})return 0;;"
fi
done
shopt -u nullglob
eval "conda_shim(){ case \"\$1\" in ${shims[@]} *)return 1;;esac;}"
# override `make_shims` to avoid conflict between pyenv-virtualenv's `envs.bash`

+ 3
- 0
pyenv.d/rehash/conda.d/.gitignore ファイルの表示

@ -0,0 +1,3 @@
*
!/.gitignore
!/default.list

pyenv.d/rehash/conda.txt → pyenv.d/rehash/conda.d/default.list ファイルの表示


+ 4
- 2
pyenv.d/rehash/source.bash ファイルの表示

@ -1,11 +1,13 @@
PROTOTYPE_SOURCE_SHIM_PATH="${SHIM_PATH}/.pyenv-source-shim"
shims=()
for shim in $(cat "${BASH_SOURCE%/*}/source.txt"); do
if [ -n "${shim%%#*}" ]; then
shopt -s nullglob
for shim in $(cat "${BASH_SOURCE%/*}/source.d/"*".list" | sort | uniq | sed -e 's/#.*$//' | sed -e '/^[[:space:]]*$/d'); do
if [ -n "${shim##*/}" ]; then
shims[${#shims[*]}]="${shim})return 0;;"
fi
done
shopt -u nullglob
eval "source_shim(){ case \"\$1\" in ${shims[@]} *)return 1;;esac;}"
cat > "${PROTOTYPE_SOURCE_SHIM_PATH}" <<SH

+ 3
- 0
pyenv.d/rehash/source.d/.gitignore ファイルの表示

@ -0,0 +1,3 @@
*
!/.gitignore
!/default.list

+ 6
- 0
pyenv.d/rehash/source.d/default.list ファイルの表示

@ -0,0 +1,6 @@
# virtualenv
activate
activate.csh
activate.fish
# gettext (#688)
gettext.sh

+ 0
- 1
pyenv.d/rehash/source.txt ファイルの表示

@ -1 +0,0 @@
gettext.sh

読み込み中…
キャンセル
保存