1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00

Added support for python venv display in paradox prompt

This commit is contained in:
Kire Ledan 2015-11-29 10:52:04 -05:00 committed by Kaleb Elwert
parent c0049855c5
commit 95d19b37c1

View File

@ -52,6 +52,10 @@ function prompt_paradox_build_prompt {
prompt_paradox_start_segment green black '${(e)git_info[ref]}${(e)git_info[status]}'
fi
if [[ -n "$python_info" ]]; then
prompt_paradox_start_segment white black '${(e)python_info[virtualenv]}'
fi
prompt_paradox_end_segment
}
@ -103,6 +107,7 @@ function prompt_paradox_precmd {
function prompt_paradox_preexec {
_prompt_paradox_start_time="$SECONDS"
python-info
}
function prompt_paradox_setup {
@ -143,6 +148,9 @@ function prompt_paradox_setup {
'ref' '$(coalesce "%b" "%p" "%c")' \
'status' '%s%D%A%B%S%a%d%m%r%U%u'
# %v - virtualenv name.
zstyle ':prezto:module:python:info:virtualenv' format 'virtualenv:%v'
# Define prompts.
PROMPT='
${(e)$(prompt_paradox_build_prompt)}