Project

General

Profile

« Previous | Next » 

Revision 12840

lib/sh/util.sh: highlight_msg(): use $format itself as the $highlight boolean

View differences:

trunk/lib/sh/util.sh
511 511
{
512 512
	kw_params format; local format="${format-1}" # bold
513 513
	if ! can_highlight_msg; then format=; fi
514
	local highlight="$(test "$format"; exit2bool)"
515
	echo "${highlight:+[0;${format}m}$1${highlight:+}"
514
	echo "${format:+[0;${format}m}$1${format:+}"
516 515
}
517 516

  
518 517
log_line!() # highlights log_level 1 messages to stand out against other output

Also available in: Unified diff