From 39a66f0e3060555259f4b1a5286a58e0b121c8f0 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 15 Dec 2021 22:08:01 +0100 Subject: [PATCH] Hide errors if git status fails --- home/.config/shell/prompt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home/.config/shell/prompt b/home/.config/shell/prompt index cad4982..c9bd65d 100755 --- a/home/.config/shell/prompt +++ b/home/.config/shell/prompt @@ -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 echo -n " $ORANGE${ref#refs/heads/}" - if [ ! -z "$(git status --short)" ]; then + if [ ! -z "$(git status --short 2>/dev/null)" ]; then echo "$RED+" fi }