Parcourir la source

Deduplicate shims in $PATH for the fish shell during initialization (#430)

When a fish login shell is invoked within an existing login shell, avoid
duplicating path to the shims by removing existing occurrences before
prepending.
pull/431/head
Eric N. Vander Weele il y a 2 ans
committed by GitHub
Parent
révision
c6ff093344
Aucune clé connue n'a été trouvée dans la base pour cette signature ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. +2
    -0
      bin/pyenv-virtualenv-init

+ 2
- 0
bin/pyenv-virtualenv-init Voir le fichier

@ -86,6 +86,8 @@ fi
case "$shell" in
fish )
cat <<EOS
while set index (contains -i -- "${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims" \$PATH)
set -eg PATH[\$index]; end; set -e index
set -gx PATH '${PYENV_VIRTUALENV_ROOT:-${PYENV_VIRTUALENV_INSTALL_PREFIX}}/shims' \$PATH;
set -gx PYENV_VIRTUALENV_INIT 1;
EOS

Chargement…
Annuler
Enregistrer