1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00
ohmyzsh/plugins/conda-env/conda-env.plugin.zsh
Jeonguk Choi 70cfff448d
feat(conda-env): add plugin for conda prompt display (#10619)
Co-authored-by: Jeonguk Choi <91456421+devj121@users.noreply.github.com>
2024-07-15 18:56:44 +02:00

9 lines
484 B
Bash

function conda_prompt_info(){
[[ -n ${CONDA_DEFAULT_ENV} ]] || return
echo "${ZSH_THEME_CONDA_PREFIX=[}${CONDA_DEFAULT_ENV:t:gs/%/%%}${ZSH_THEME_CONDA_SUFFIX=]}"
}
# Has the same effect as `conda config --set changeps1 false`
# - https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#determining-your-current-environment
# - https://conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html#precedence
export CONDA_CHANGEPS1=false