Optimize _lp_sl/sr/sb

This commit is contained in:
Olivier Mengué 2013-05-05 00:34:03 +02:00
parent 7e01b1648c
commit 81bc91d4dc

View File

@ -1325,26 +1325,19 @@ _lp_smart_mark()
# insert a space on the right # insert a space on the right
_lp_sr() _lp_sr()
{ {
if [[ ! -z "$1" ]] ; then [[ -n "$1" ]] && echo -n "$1 "
echo -n "$1 "
fi
} }
# insert a space on the left # insert a space on the left
_lp_sl() _lp_sl()
{ {
if [[ ! -z "$1" ]] ; then [[ -n "$1" ]] && echo -n " $1"
echo -n " $1"
fi
} }
# insert two space, before and after # insert two space, before and after
_lp_sb() _lp_sb()
{ {
if [[ ! -z "$1" ]] ; then [[ -n "$1" ]] && echo -n " $1 "
echo -n " $1 "
fi
} }
################### ###################