mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-11-10 02:39:40 +00:00
Hide errors if git status fails
This commit is contained in:
parent
177a33cc69
commit
39a66f0e30
|
@ -52,7 +52,7 @@ git_prompt() {
|
||||||
ref=$(command git symbolic-ref HEAD 2> /dev/null) || ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
|
ref=$(command git symbolic-ref HEAD 2> /dev/null) || ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
|
||||||
echo -n " $ORANGE${ref#refs/heads/}"
|
echo -n " $ORANGE${ref#refs/heads/}"
|
||||||
|
|
||||||
if [ ! -z "$(git status --short)" ]; then
|
if [ ! -z "$(git status --short 2>/dev/null)" ]; then
|
||||||
echo "$RED+"
|
echo "$RED+"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue