slitaz-base-files diff rootfs/lib/libtaz.sh @ rev 324
libtaz.sh: indent status() as orgininaly (so many cmdline tools use it, we must an other way for log files)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Feb 16 08:53:24 2017 +0100 (2017-02-16) |
parents | 5829aa52b9ee |
children | 4cb0e4cf962e |
line diff
1.1 --- a/rootfs/lib/libtaz.sh Sun Jan 08 11:09:57 2017 +0200 1.2 +++ b/rootfs/lib/libtaz.sh Thu Feb 16 08:53:24 2017 +0100 1.3 @@ -63,7 +63,10 @@ 1.4 case $output in 1.5 raw|gtk) echo " $msg";; 1.6 html) echo " <span class=\"float-right color$color\">$msg</span>";; 1.7 - *) echo -e "[ \\033[1;${color}m$msg\\033[0;39m ]";; 1.8 + *) 1.9 + local cols=$(get_cols) 1.10 + local scol=$((${cols:-80} - 10)) 1.11 + echo -e "\\033[${scol}G[ \\033[1;${color}m$msg\\033[0;39m ]";; 1.12 esac 1.13 } 1.14