Project

General

Profile

« Previous | Next » 

Revision 12810

lib/sh/util.sh: highlight_msg(): allow turning off formatting w/ empty $format

View differences:

util.sh
489 489
# format: the # in xfree86.org/current/ctlseqs.html#Character_Attributes
490 490
{
491 491
	kw_params format; local format="${format-4}" # underline
492
	local highlight="$(can_highlight_msg; exit2bool)"
492
	local highlight="$(test "$format" && can_highlight_msg; exit2bool)"
493 493
	echo "${highlight:+[${format}m}$1${highlight:+}"
494 494
}
495 495

  

Also available in: Unified diff