From 1f9e3512b6d79e5b55645b8dcfaf850e2aa20245 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Sun, 10 Dec 2023 16:14:07 -0500 Subject: [PATCH] fix(bash): deal with newlines better --- common/home/bash/config/bashrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/home/bash/config/bashrc b/common/home/bash/config/bashrc index 8d30878f..bdff6594 100644 --- a/common/home/bash/config/bashrc +++ b/common/home/bash/config/bashrc @@ -6,10 +6,11 @@ grep -v -e "On branch" \ -e "up to date" \ -e 'use "git' \ - -e "nothing to commit" | - sed '/^$/d') + -e "nothing to commit") - if [ "$GIT" != "" ]; then + CHECK=$(echo "$GIT" | sed '/^$/d') + + if [ "$CHECK" != "" ]; then echo "$GIT" echo fi