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

Rename python-info zstyle patterns

This commit is contained in:
Sorin Ionescu 2012-10-01 22:02:47 -04:00
parent 8ea0e42b7f
commit f12c24e76e
3 changed files with 3 additions and 3 deletions

View File

@ -82,7 +82,7 @@ function prompt_steeef_setup {
zstyle ':vcs_info:*:prompt:*' nvcsformats "" zstyle ':vcs_info:*:prompt:*' nvcsformats ""
# Set python-info parameters. # Set python-info parameters.
zstyle ':prezto:module:python' virtualenv '(%v)' zstyle ':prezto:module:python:info:virtualenv' format '(%v)'
# Define prompts. # Define prompts.
PROMPT=" PROMPT="

View File

@ -89,7 +89,7 @@ To display the name of the current virtual enviroment in a prompt, define the
following style in the `prompt_theme_setup` function. following style in the `prompt_theme_setup` function.
# %v - virtualenv name. # %v - virtualenv name.
zstyle ':prezto:module:python' virtualenv 'virtualenv:%v' zstyle ':prezto:module:python:info:virtualenv' format 'virtualenv:%v'
Then add `$python_info[virtualenv]` to `$PROMPT` or `$RPROMPT` and call Then add `$python_info[virtualenv]` to `$PROMPT` or `$RPROMPT` and call
`python-info` in the `prompt_theme_preexec` hook function. `python-info` in the `prompt_theme_preexec` hook function.

View File

@ -15,7 +15,7 @@ typeset -gA python_info
# Format virtualenv. # Format virtualenv.
if [[ -n "$VIRTUAL_ENV" ]]; then if [[ -n "$VIRTUAL_ENV" ]]; then
zstyle -s ':prezto:module:python' virtualenv 'virtualenv_format' zstyle -s ':prezto:module:python:info:virtualenv' format 'virtualenv_format'
zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}" zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
python_info[virtualenv]="$virtualenv_formatted" python_info[virtualenv]="$virtualenv_formatted"
fi fi