mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 01:52:31 +01: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:
parent
379e974d2b
commit
70cfff448d
3 changed files with 54 additions and 0 deletions
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue