prezto_config/modules/python/functions/python-info
Sorin Ionescu 98c545a102 [Fix #248] Replace virtualenv_info with python-info
Conflicts:
	modules/python/README.md
2012-09-03 10:34:41 -04:00

21 lines
470 B
Text

#
# Displays Python information.
#
# 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
zstyle -s ':omz:module:python' virtualenv 'virtualenv_format'
zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
python_info[virtualenv]="$virtualenv_formatted"
fi