1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-06 07:20:40 +01:00

feat(agnoster): add conda support (#13160)

Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
This commit is contained in:
AYO_YO
2025-06-08 16:23:48 +08:00
committed by GitHub
parent 95ef251669
commit ac5295678f

View File

@@ -314,6 +314,9 @@ prompt_dir() {
# Virtualenv: current working virtualenv # Virtualenv: current working virtualenv
prompt_virtualenv() { prompt_virtualenv() {
if [ -n "$CONDA_DEFAULT_ENV" ]; then
prompt_segment magenta $CURRENT_FG "🐍 $CONDA_DEFAULT_ENV"
fi
if [[ -n "$VIRTUAL_ENV" && -n "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then if [[ -n "$VIRTUAL_ENV" && -n "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
prompt_segment "$AGNOSTER_VENV_BG" "$AGNOSTER_VENV_FG" "(${VIRTUAL_ENV:t:gs/%/%%})" prompt_segment "$AGNOSTER_VENV_BG" "$AGNOSTER_VENV_FG" "(${VIRTUAL_ENV:t:gs/%/%%})"
fi fi