mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 05:40:08 +00:00
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:
parent
1120f97305
commit
8ce35df2c5
1 changed files with 9 additions and 7 deletions
16
lib/git.zsh
16
lib/git.zsh
|
@ -8,13 +8,15 @@ function git_prompt_info() {
|
||||||
# Checks if working tree is dirty
|
# Checks if working tree is dirty
|
||||||
parse_git_dirty() {
|
parse_git_dirty() {
|
||||||
local SUBMODULE_SYNTAX=''
|
local SUBMODULE_SYNTAX=''
|
||||||
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
|
if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
|
||||||
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
|
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
|
||||||
fi
|
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
|
||||||
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
|
fi
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
|
||||||
else
|
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
|
||||||
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
else
|
||||||
|
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue