Lines 326-335
_eend() {
Link Here
|
326 |
fi |
326 |
fi |
327 |
|
327 |
|
328 |
if [[ ${RC_ENDCOL} == "yes" ]] ; then |
328 |
if [[ ${RC_ENDCOL} == "yes" ]] ; then |
329 |
echo -e "${ENDCOL} ${msg}" |
329 |
echo -e "${ENDCOL} ${msg}" |
330 |
else |
330 |
else |
331 |
[[ ${LAST_E_CMD} == ebegin ]] || LAST_E_LEN=0 |
331 |
[[ ${LAST_E_CMD} == ebegin ]] || LAST_E_LEN=0 |
332 |
printf "%$(( COLS - LAST_E_LEN - 6 ))s%b\n" '' "${msg}" |
332 |
printf "%$(( COLS - LAST_E_LEN - 7 ))s%b\n" '' "${msg}" |
333 |
fi |
333 |
fi |
334 |
|
334 |
|
335 |
return ${retval} |
335 |
return ${retval} |
Lines 397-403
get_KV() {
Link Here
|
397 |
} |
397 |
} |
398 |
|
398 |
|
399 |
unset_colors() { |
399 |
unset_colors() { |
400 |
COLS="25 80" |
400 |
COLS=80 |
401 |
ENDCOL= |
401 |
ENDCOL= |
402 |
|
402 |
|
403 |
GOOD= |
403 |
GOOD= |
Lines 412-424
set_colors() {
Link Here
|
412 |
COLS=${COLUMNS:-0} # bash's internal COLUMNS variable |
412 |
COLS=${COLUMNS:-0} # bash's internal COLUMNS variable |
413 |
(( COLS == 0 )) && COLS=$(set -- $(stty size 2>/dev/null) ; echo $2) |
413 |
(( COLS == 0 )) && COLS=$(set -- $(stty size 2>/dev/null) ; echo $2) |
414 |
(( COLS > 0 )) || (( COLS = 80 )) |
414 |
(( COLS > 0 )) || (( COLS = 80 )) |
415 |
COLS=$((${COLS} - 8)) # width of [ ok ] == 7 |
|
|
416 |
# Adjust COLS so that eend works properly on a standard BSD console. |
417 |
[[ $TERM = cons25 || $TERM = dumb ]] && ((COLS--)) |
418 |
|
415 |
|
419 |
# Now, ${ENDCOL} will move us to the end of the |
416 |
# Now, ${ENDCOL} will move us to the end of the |
420 |
# column; irregardless of character width |
417 |
# column; irregardless of character width |
421 |
ENDCOL=$'\e[A\e['${COLS}'C' |
418 |
ENDCOL=$'\e[A\e['$(( COLS - 8 ))'C' |
422 |
if [ -n "${PORTAGE_COLORMAP}" ] ; then |
419 |
if [ -n "${PORTAGE_COLORMAP}" ] ; then |
423 |
eval ${PORTAGE_COLORMAP} |
420 |
eval ${PORTAGE_COLORMAP} |
424 |
else |
421 |
else |