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
_lp_sr()
{
if [[ ! -z "$1" ]] ; then
echo -n "$1 "
fi
[[ -n "$1" ]] && echo -n "$1 "
}
# insert a space on the left
_lp_sl()
{
if [[ ! -z "$1" ]] ; then
echo -n " $1"
fi
[[ -n "$1" ]] && echo -n " $1"
}
# insert two space, before and after
_lp_sb()
{
if [[ ! -z "$1" ]] ; then
echo -n " $1 "
fi
[[ -n "$1" ]] && echo -n " $1 "
}
###################