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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -314,6 +314,9 @@ prompt_dir() {
# Virtualenv: current working 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
prompt_segment "$AGNOSTER_VENV_BG" "$AGNOSTER_VENV_FG" "(${VIRTUAL_ENV:t:gs/%/%%})"
fi