1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-02 00:29:25 +00:00

Added conda virtualenv support to python module. (#1505)

* Added conda virtualenv support to python module
* Added instructions for Python module options to README

Thanks to @egpbos for the original feature and @ickc for fixing the merge conflicts.
This commit is contained in:
ickc
2017-11-12 16:20:52 -08:00
committed by Kaleb Elwert
parent ce349dff81
commit 96bbb31cc8
3 changed files with 35 additions and 0 deletions

View File

@ -4,6 +4,7 @@
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
# Patrick Bos <egpbos@gmail.com>
#
# function python-info {
@ -22,4 +23,11 @@ if [[ -n "$VIRTUAL_ENV" ]]; then
python_info[virtualenv]="$virtualenv_formatted"
fi
# Do the same for Conda virtual environments
if [[ -n "$CONDA_DEFAULT_ENV" ]]; then
zstyle -s ':prezto:module:python:info:virtualenv' format 'virtualenv_format'
zformat -f virtualenv_formatted "$virtualenv_format" "v:${CONDA_DEFAULT_ENV:t}"
python_info[virtualenv]="$virtualenv_formatted"
fi
# }