mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 20:59:26 +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:
@ -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
|
||||
|
||||
# }
|
||||
|
Reference in New Issue
Block a user