Revision 12843
Added by Aaron Marcuse-Kubitza almost 11 years ago
util.sh | ||
---|---|---|
511 | 511 |
{ |
512 | 512 |
kw_params format; local format="${format-1}" # bold |
513 | 513 |
if ! can_highlight_msg; then format=; fi |
514 |
if starts_with '[' "$1"; then format=; fi #already formatted->don't ' '-pad |
|
514 | 515 |
if has_bg "$format"; then set -- " $1 "; fi # auto-add padding if has bg |
515 | 516 |
echo "${format:+[0;${format}m}$1${format:+[0m}" |
516 | 517 |
} |
Also available in: Unified diff
fix: lib/sh/util.sh: highlight_msg(): don't ' '-pad already-formatted text