1
0
Fork 0

Merge sorin-ionescu/prezto/pull/1173

pull/1130/head
Federico Castagnini 8 years ago
commit 4bd3a8d958
No known key found for this signature in database
GPG Key ID: B8F54AA3DB400B54

@ -6,6 +6,9 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
local version
local version_format
local version_formatted
local virtualenv_format
local virtualenv_formatted
@ -13,6 +16,17 @@ local virtualenv_formatted
unset python_info
typeset -gA python_info
if (( $+commands[pyenv] )); then
version="${"$(pyenv version)"%% *}"
fi
# Format version.
if [[ -n "$version" ]]; then
zstyle -s ':prezto:module:python:info:version' format 'version_format'
zformat -f version_formatted "$version_format" "v:$version"
python_info[version]="${version_formatted}"
fi
# Format virtualenv.
if [[ -n "$VIRTUAL_ENV" ]]; then
zstyle -s ':prezto:module:python:info:virtualenv' format 'virtualenv_format'

Loading…
Cancel
Save