1
0
chezmoi/home/dot_config/direnv/direnvrc

21 lines
629 B
Plaintext
Raw Normal View History

2024-05-28 12:35:48 +00:00
# To permit asdf manage node versions
NODE_VERSION_PREFIX=""
NODE_VERSIONS=${ASDF_DIR}/installs/nodejs
# Conda management
layout_anaconda() {
local ACTIVATE="${HOME}/miniconda3/bin/activate"
if [ -n "$1" ]; then
# Explicit environment name from layout command.
local env_name="$1"
source $ACTIVATE ${env_name}
elif (grep -q name: environment.yml); then
# Detect environment name from `environment.yml` file in `.envrc` directory
source $ACTIVATE `grep name: environment.yml | sed -e 's/name: //' | cut -d "'" -f 2 | cut -d '"' -f 2`
else
(>&2 echo No environment specified);
exit 1;
fi;
}