diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-05-02 17:23:13 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-05-02 17:23:13 +0000 |
commit | 09aef544dd776f7b63d4d930a94993bd07297c6d (patch) | |
tree | 0f875aa0b2436b638a429252ba12a953bbcd3173 /bin/isolated-functions.sh | |
parent | caf0b1e031a0515f42147184362e76e0767c478d (diff) | |
download | portage-09aef544dd776f7b63d4d930a94993bd07297c6d.tar.gz portage-09aef544dd776f7b63d4d930a94993bd07297c6d.tar.bz2 portage-09aef544dd776f7b63d4d930a94993bd07297c6d.zip |
Fix eend so that it works properly on a standard BSD console. Thanks to UberLord.
svn path=/main/trunk/; revision=6467
Diffstat (limited to 'bin/isolated-functions.sh')
-rwxr-xr-x | bin/isolated-functions.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh index 41595ea30..e6517af74 100755 --- a/bin/isolated-functions.sh +++ b/bin/isolated-functions.sh @@ -279,6 +279,8 @@ set_colors() { (( COLS == 0 )) && COLS=$(set -- $(stty size 2>/dev/null) ; echo $2) (( COLS > 0 )) || (( COLS = 80 )) COLS=$((${COLS} - 8)) # width of [ ok ] == 7 + # Adjust COLS so that eend works properly on a standard BSD console. + [ "${TERM}" = "cons25" ] && COLS=$((${COLS} - 1)) ENDCOL=$'\e[A\e['${COLS}'C' # Now, ${ENDCOL} will move us to the end of the # column; irregardless of character width |