mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-07 07:59:49 +00:00
feat(conda-env): add plugin for conda prompt display (#10619)
Co-authored-by: Jeonguk Choi <91456421+devj121@users.noreply.github.com>
This commit is contained in:
9
plugins/conda-env/conda-env.plugin.zsh
Normal file
9
plugins/conda-env/conda-env.plugin.zsh
Normal file
@@ -0,0 +1,9 @@
|
||||
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
|
||||
Reference in New Issue
Block a user