1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2026-02-12 20:31:00 +01:00

2 Commits

Author SHA1 Message Date
James Langley
788eaa5930 fix(functions): escape especial chars in WSL (#13158) 2025-06-08 10:25:23 +02:00
AYO_YO
ac5295678f feat(agnoster): add conda support (#13160)
Co-authored-by: Carlo Sala <carlosalag@protonmail.com>
2025-06-08 10:23:48 +02:00
2 changed files with 6 additions and 0 deletions

View File

@@ -23,6 +23,9 @@ function open_command() {
linux*) [[ "$(uname -r)" != *icrosoft* ]] && open_cmd='nohup xdg-open' || {
open_cmd='cmd.exe /c start ""'
[[ -e "$1" ]] && { 1="$(wslpath -w "${1:a}")" || return 1 }
[[ "$1" = (http|https)://* ]] && {
1="$(echo "$1" | sed -E 's/([&|()<>^])/^\1/g')" || return 1
}
} ;;
msys*) open_cmd='start ""' ;;
*) echo "Platform $OSTYPE not supported"

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