Added virtualenv visual
This commit is contained in:
parent
a3c9530ab7
commit
9f8f0cdc83
2 changed files with 11 additions and 3 deletions
|
@ -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 yellow black '${python_info[ref]}${python_info[virtualenv]}'
|
||||
fi
|
||||
|
||||
prompt_paradox_end_segment
|
||||
}
|
||||
|
||||
|
@ -97,6 +101,11 @@ function prompt_paradox_precmd {
|
|||
git-info
|
||||
fi
|
||||
|
||||
# Get Virtual env info
|
||||
if (( $+functions[python-info] )); then
|
||||
python-info
|
||||
fi
|
||||
|
||||
# Calculate and print the elapsed time.
|
||||
prompt_paradox_print_elapsed_time
|
||||
}
|
||||
|
@ -142,6 +151,7 @@ function prompt_paradox_setup {
|
|||
zstyle ':prezto:module:git:info:keys' format \
|
||||
'ref' '$(coalesce "%b" "%p" "%c")' \
|
||||
'status' '%s%D%A%B%S%a%d%m%r%U%u'
|
||||
zstyle ':prezto:module:python:info:virtualenv' format '%F{black}py:%v%f'
|
||||
|
||||
# Define prompts.
|
||||
PROMPT='
|
||||
|
|
|
@ -31,7 +31,6 @@ zstyle ':prezto:load' pmodule \
|
|||
'history-substring-search' \
|
||||
'directory' \
|
||||
'spectrum' \
|
||||
'utility' \
|
||||
'completion' \
|
||||
'osx' \
|
||||
'git' \
|
||||
|
@ -39,7 +38,6 @@ zstyle ':prezto:load' pmodule \
|
|||
'python' \
|
||||
'haskell' \
|
||||
'syntax-highlighting' \
|
||||
'utility' \
|
||||
'archive' \
|
||||
'prompt'
|
||||
|
||||
|
@ -94,7 +92,7 @@ zstyle ':prezto:module:editor' key-bindings 'vi'
|
|||
# Set the prompt theme to load.
|
||||
# Setting it to 'random' loads a random theme.
|
||||
# Auto set to 'off' on dumb terminals.
|
||||
zstyle ':prezto:module:prompt' theme 'sorin'
|
||||
zstyle ':prezto:module:prompt' theme 'paradox'
|
||||
|
||||
#
|
||||
# Ruby
|
||||
|
|
Loading…
Add table
Reference in a new issue