This repository has been archived on 2022-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
prezto/modules/python/functions/python-info

22 lines
546 B
Plaintext
Raw Permalink Normal View History

#
2012-09-06 23:17:38 -04:00
# Exposes information about the Python environment via the $python_info
# associative array.
#
# 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-01 22:02:47 -04:00
zstyle -s ':prezto:module:python:info:virtualenv' format 'virtualenv_format'
zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
python_info[virtualenv]="$virtualenv_formatted"
fi