1
0
Fork 0

Git-info: add zstyle for disabling prompt for all repos

This might be useful for users who want to avoid the slow git-info call,
but want to keep the aliases. Updated CTRL + C message to indicate this option.
pull/394/head
Oren Held 12 years ago
parent bafc66e232
commit 06c604e369

@ -104,6 +104,9 @@ This process may be time-intensive for certain repositories.
To disable zsh git prompt for this repository, execute:
git-info off
To disable zsh git prompt for all repositories, add to zpreztorc:
zstyle ':prezto:module:git:info' disable-prompt 'yes'
EOF
unset _git_info_executing
@ -147,6 +150,7 @@ function git-info {
local dirty=0
local dirty_format
local dirty_formatted
local disable_prompt
local ignore_submodules
local -A info_formats
local info_format
@ -200,6 +204,12 @@ function git-info {
return 1
fi
# Return if git-info is disabled
zstyle -b ':prezto:module:git:info' disable-prompt 'disable_prompt'
if [[ "$disable_prompt" == "yes" ]]; then
return 1
fi
# Used to abort and turn git-info off on SIGINT.
_git_info_executing=true

Loading…
Cancel
Save