Mercurial > repos > other > linux
diff bashrc @ 131:5f6e4aa53501
Let Conda activation use the local directory as a name
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 26 Nov 2019 10:35:23 +0000 |
parents | 724d0e149569 |
children | 920255137b9d |
line wrap: on
line diff
--- a/bashrc Tue Oct 29 16:49:15 2019 +0000 +++ b/bashrc Tue Nov 26 10:35:23 2019 +0000 @@ -88,4 +88,14 @@ fi fi unset __conda_setup + + if [ $# -eq 1 ]; then + if [ "x$1" == "x." ]; then + _conda_env=$(basename $(readlink -f .)) + else + _conda_env=$1 + fi + conda activate $_conda_env + fi + unset _conda_env } \ No newline at end of file