2012-09-03 16:34:41 +02:00
|
|
|
#
|
2012-09-07 05:17:38 +02:00
|
|
|
# Exposes information about the Python environment via the $python_info
|
|
|
|
# associative array.
|
2012-09-03 16:34:41 +02:00
|
|
|
#
|
|
|
|
# Authors:
|
|
|
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
|
|
|
#
|
|
|
|
|
|
|
|
local virtualenv_format
|
|
|
|
local virtualenv_formatted
|
|
|
|
|
|
|
|
# Clean up previous $python_info.
|
|
|
|
unset python_info
|
|
|
|
typeset -gA python_info
|
|
|
|
|
|
|
|
# Format virtualenv.
|
|
|
|
if [[ -n "$VIRTUAL_ENV" ]]; then
|
2012-10-02 04:02:47 +02:00
|
|
|
zstyle -s ':prezto:module:python:info:virtualenv' format 'virtualenv_format'
|
2012-09-03 16:34:41 +02:00
|
|
|
zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
|
|
|
|
python_info[virtualenv]="$virtualenv_formatted"
|
|
|
|
fi
|