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

Commit

Permalink
Merge pull request #1128 from ymage/fix_virtualenv_prompt
Browse files Browse the repository at this point in the history
[Bugfix] virtualenv prompt displaying
  • Loading branch information
dritter committed Jan 23, 2019
2 parents 2f4b150 + ee74169 commit e028513
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions powerlevel9k.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -1648,9 +1648,11 @@ prompt_vi_mode() {
# https://virtualenv.pypa.io/en/latest/
prompt_virtualenv() {
local virtualenv_path="$VIRTUAL_ENV"
if [[ -n "$virtualenv_path" && -z "$VIRTUAL_ENV_DISABLE_PROMPT" ]]; then
"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$(basename "$virtualenv_path")" 'PYTHON_ICON'
fi

# Early exit; $virtualenv_path must always be set.
[[ -z "$virtualenv_path" ]] && return

"$1_prompt_segment" "$0" "$2" "blue" "$DEFAULT_COLOR" "$(basename "$virtualenv_path")" 'PYTHON_ICON'
}

################################################################
Expand Down

0 comments on commit e028513

Please sign in to comment.