From fda1e4783211532a097d6b98f51ad2d9552a8589 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 4 Feb 2020 21:51:08 +0100 Subject: [PATCH] Add conditional whitespace after gitpath --- bin/gitpath | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/gitpath b/bin/gitpath index 67cb1b3..eaf74c5 100755 --- a/bin/gitpath +++ b/bin/gitpath @@ -3,7 +3,10 @@ top=$(git rev-parse --show-toplevel 2>/dev/null | sed -e 's/\//\\\//g') if [ -n "$top" ] then - echo $(pwd | sed -e "s/^$top//") + path=$(pwd | sed -e "s/^$top//") + if [ ! -z "$path" ] + then echo -n "$path " + fi else - exit 1 + exit 1 fi