Add option to disable status notification

For certain git repositories, this slows down usage
of the shell horifically.

This option can be set with

    git config --add oh-my-zsh.hide-status 1

which will disable checking/showing the status notification
This commit is contained in:
Martin Meredith 2012-04-18 11:45:22 +01:00
parent 1120f97305
commit 8ce35df2c5

View File

@ -8,6 +8,7 @@ function git_prompt_info() {
# Checks if working tree is dirty
parse_git_dirty() {
local SUBMODULE_SYNTAX=''
if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
@ -16,6 +17,7 @@ parse_git_dirty() {
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
fi
}