This commit is contained in:
newbieQQ 2026-05-03 15:35:33 +08:00
parent 8b41b1d913
commit 9878cd8a7e
3 changed files with 11 additions and 0 deletions

View File

@ -38,3 +38,4 @@ fi
alias ca="conda activate"
compdef ca=conda 2>/dev/null || true

View File

@ -4,5 +4,6 @@ source $OMZ/plugins/extract/extract.plugin.zsh
source $OMZ/plugins/fzf-tab/fzf-tab.zsh
source $OMZ/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source $OMZ/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $OMZ/plugins/conda-env/conda-env.plugin.zsh

View 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