Skip to content

Commit

Permalink
Merge pull request #11 from MichaelAquilina/python_virtualenv
Browse files Browse the repository at this point in the history
Add python virtualenv segment
  • Loading branch information
agnoster authored Aug 9, 2016
2 parents 43cb371 + e2371ec commit f3ff367
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions agnoster.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,22 @@ prompt_status() {
[[ -n "$symbols" ]] && prompt_segment $PRIMARY_FG default " $symbols "
}

# Display current virtual environment
prompt_virtualenv() {
if [[ -n $VIRTUAL_ENV ]]; then
color=cyan
prompt_segment $color $PRIMARY_FG
print -Pn " $(basename $VIRTUAL_ENV) "
fi
}

## Main prompt
prompt_agnoster_main() {
RETVAL=$?
CURRENT_BG='NONE'
prompt_status
prompt_context
prompt_virtualenv
prompt_dir
prompt_git
prompt_end
Expand Down

0 comments on commit f3ff367

Please sign in to comment.