Optimize _lp_proxy

This commit is contained in:
Olivier Mengué 2013-05-03 23:42:26 +02:00
parent 554c155afb
commit 5ead985c8a

View File

@ -440,11 +440,7 @@ esac
# put an arrow if an http proxy is set
_lp_proxy()
{
[[ "$LP_ENABLE_PROXY" != 1 ]] && return
if [[ ! -z "$http_proxy" ]] ; then
echo -ne "$LP_COLOR_PROXY$LP_MARK_PROXY$NO_COL"
fi
[[ "$LP_ENABLE_PROXY,$http_proxy" = 1,?* ]] && echo -ne "$LP_COLOR_PROXY$LP_MARK_PROXY$NO_COL"
}
# BASH/ZSH function that shortens