Project

General

Profile

« Previous | Next » 

Revision 12839

lib/sh/util.sh: highlight_msg(): split apart the testing of $format and can_highlight_msg

View differences:

util.sh
510 510
# format: the # in xfree86.org/current/ctlseqs.html#Character_Attributes
511 511
{
512 512
	kw_params format; local format="${format-1}" # bold
513
	local highlight="$(test "$format" && can_highlight_msg; exit2bool)"
513
	if ! can_highlight_msg; then format=; fi
514
	local highlight="$(test "$format"; exit2bool)"
514 515
	echo "${highlight:+[0;${format}m}$1${highlight:+}"
515 516
}
516 517

  

Also available in: Unified diff