From efa88e6963d125049938d8911454182808411c31 Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Tue, 18 Oct 2022 06:54:03 +0200 Subject: [PATCH] [bash] fix 'grep: warning stray \ before #' --- bash/bashrc.d/prompt_command.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash/bashrc.d/prompt_command.bash b/bash/bashrc.d/prompt_command.bash index cc1a4ee..06a1323 100644 --- a/bash/bashrc.d/prompt_command.bash +++ b/bash/bashrc.d/prompt_command.bash @@ -230,7 +230,7 @@ function git_status() { ### Test For Changes ### {{{ ## Change this to test for 'ahead' or 'behind'! - local GChanges="$(echo ${GStat} | tr ':' '\n' | grep -v "^$" | grep -v "^\#\#" | wc -l | tr -d ' ')" + local GChanges="$(echo ${GStat} | tr ':' '\n' | grep -v "^$" | grep -v "^##" | wc -l | tr -d ' ')" if [ "$GChanges" == "0" ]; then local GitCol=$Gre else @@ -271,7 +271,7 @@ function git_status() { PS1+="${Pur}≠${RCol}${GMod}" # Modified fi - local GUnt="$(echo ${GStat} | tr ':' '\n' | grep -c "^\?")" + local GUnt="$(echo ${GStat} | tr ':' '\n' | grep -c "^?")" if [ "$GUnt" -gt "0" ]; then PS1+="${Yel}?${RCol}${GUnt}" # Untracked fi