Skip to content
This repository was archived by the owner on Apr 24, 2020. It is now read-only.

Commit e028513

Browse files
authored
Merge pull request #1128 from ymage/fix_virtualenv_prompt
[Bugfix] virtualenv prompt displaying
2 parents 2f4b150 + ee74169 commit e028513

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

powerlevel9k.zsh-theme

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,9 +1648,11 @@ prompt_vi_mode() {
16481648
# https://virtualenv.pypa.io/en/latest/
16491649
prompt_virtualenv() {
16501650
local virtualenv_path="$VIRTUAL_ENV"
1651-
if [[ -n "$virtualenv_path" && -z "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
1652-
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$(basename "$virtualenv_path")" 'PYTHON_ICON'
1653-
fi
1651+
1652+
# Early exit; $virtualenv_path must always be set.
1653+
[[ -z "$virtualenv_path" ]] && return
1654+
1655+
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$(basename "$virtualenv_path")" 'PYTHON_ICON'
16541656
}
16551657

16561658
################################################################

0 commit comments

Comments
 (0)