Add conditional whitespace after gitpath
This commit is contained in:
parent
0882f046e9
commit
fda1e47832
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,10 @@
|
||||||
top=$(git rev-parse --show-toplevel 2>/dev/null | sed -e 's/\//\\\//g')
|
top=$(git rev-parse --show-toplevel 2>/dev/null | sed -e 's/\//\\\//g')
|
||||||
if [ -n "$top" ]
|
if [ -n "$top" ]
|
||||||
then
|
then
|
||||||
echo $(pwd | sed -e "s/^$top//")
|
path=$(pwd | sed -e "s/^$top//")
|
||||||
|
if [ ! -z "$path" ]
|
||||||
|
then echo -n "$path "
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue