1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-12 08:50:08 +00:00

Fix git R and M status when used together

This commit is contained in:
Adam Lindberg 2011-06-07 15:40:32 +02:00
parent 73946a6066
commit 4a7392fdd0

View file

@ -35,7 +35,7 @@ custom_git_prompt_status() {
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
fi fi
if $(echo "$INDEX" | grep '^ M ' &> /dev/null); then if $(echo "$INDEX" | grep '^.M ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then elif $(echo "$INDEX" | grep '^AM ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_MODIFIED$STATUS"
@ -46,7 +46,7 @@ custom_git_prompt_status() {
if $(echo "$INDEX" | grep '^D ' &> /dev/null); then if $(echo "$INDEX" | grep '^D ' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_DELETED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_DELETED$STATUS"
fi fi
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then if $(echo "$INDEX" | grep '^R' &> /dev/null); then
STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_RENAMED$STATUS" STATUS="$ZSH_THEME_GIT_PROMPT_STAGED_RENAMED$STATUS"
fi fi
if $(echo "$INDEX" | grep '^M ' &> /dev/null); then if $(echo "$INDEX" | grep '^M ' &> /dev/null); then