mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-02-16 14:20:59 +01:00
Compare commits
2 Commits
95ef251669
...
788eaa5930
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
788eaa5930 | ||
|
|
ac5295678f |
@@ -23,6 +23,9 @@ function open_command() {
|
|||||||
linux*) [[ "$(uname -r)" != *icrosoft* ]] && open_cmd='nohup xdg-open' || {
|
linux*) [[ "$(uname -r)" != *icrosoft* ]] && open_cmd='nohup xdg-open' || {
|
||||||
open_cmd='cmd.exe /c start ""'
|
open_cmd='cmd.exe /c start ""'
|
||||||
[[ -e "$1" ]] && { 1="$(wslpath -w "${1:a}")" || return 1 }
|
[[ -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 ""' ;;
|
msys*) open_cmd='start ""' ;;
|
||||||
*) echo "Platform $OSTYPE not supported"
|
*) echo "Platform $OSTYPE not supported"
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user