2023-06-30 16:18:38 -07:00
|
|
|
# Note: location of conda can be unpredictable; user is expected to
|
|
|
|
# run `conda init zsh` as normal then move resulting .zshrc
|
2023-06-30 16:23:45 -07:00
|
|
|
# modifications to .zshrc.preload
|
2023-06-30 16:18:38 -07:00
|
|
|
|
|
|
|
# recommended settings for .condarc:
|
|
|
|
# auto_assign_base: false
|
|
|
|
# changeps1: false
|
|
|
|
|
2023-06-30 17:05:18 -07:00
|
|
|
function conda_prompt() {
|
2023-06-30 16:18:38 -07:00
|
|
|
if [[ -v CONDA_DEFAULT_ENV && "$CONDA_DEFAULT_ENV" != "base" ]]; then
|
2023-06-30 17:05:18 -07:00
|
|
|
print "%{$fg[cyan]%}$CONDA_DEFAULT_ENV"
|
2023-06-30 16:18:38 -07:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
if (( ${+commands[conda]} )); then
|
2023-06-30 17:05:18 -07:00
|
|
|
rprompt_functions+=conda_prompt
|
2023-06-30 16:18:38 -07:00
|
|
|
fi
|