From a54be0cab28b8a3a6ff006adb511ec9d3d5fb419 Mon Sep 17 00:00:00 2001 From: Andrew Christianson Date: Tue, 5 Mar 2019 11:22:13 -0800 Subject: [PATCH] set/unset CONDA_PREFIX on activate --- bin/pyenv-sh-activate | 2 ++ bin/pyenv-sh-deactivate | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/pyenv-sh-activate b/bin/pyenv-sh-activate index 7c28dcae..144a3f4b 100755 --- a/bin/pyenv-sh-activate +++ b/bin/pyenv-sh-activate @@ -187,9 +187,11 @@ if [ -d "${prefix}/conda-meta" ] || case "${shell}" in fish ) echo "set -gx CONDA_DEFAULT_ENV \"${CONDA_DEFAULT_ENV}\";" + echo "set -gx CONDA_PREFIX \"${prefix}\";" ;; * ) echo "export CONDA_DEFAULT_ENV=\"${CONDA_DEFAULT_ENV}\";" + echo "export CONDA_PREFIX=\"${prefix}\";" ;; esac fi diff --git a/bin/pyenv-sh-deactivate b/bin/pyenv-sh-deactivate index 90c3322a..9e4656c0 100755 --- a/bin/pyenv-sh-deactivate +++ b/bin/pyenv-sh-deactivate @@ -64,7 +64,7 @@ if [ -d "${prefix}/conda-meta" ] || shopt -s nullglob case "${shell}" in fish ) - : # conda doesn't support fish + echo "set -e CONDA_PREFIX" ;; * ) for script in "${prefix}/etc/conda/deactivate.d"/*.sh; do