Add conditional whitespace after gitpath

This commit is contained in:
Talia 2020-02-04 21:51:08 +01:00
parent 0882f046e9
commit fda1e47832

View file

@ -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
fi