Project

General

Profile

« Previous | Next » 

Revision 12838

lib/sh/util.sh: added has_bg()

View differences:

trunk/lib/sh/util.sh
499 499

  
500 500
can_highlight_msg() { test "$log_level" -le 1; }
501 501

  
502
has_bg()
503
{
504
	# inverse (black background)/set background (normal colors)/set background
505
	# (bright colors) (xfree86.org/current/ctlseqs.html#Character_Attributes)
506
	starts_with 7 "$1" || starts_with 4 "$1" || starts_with 10 "$1"
507
}
508

  
502 509
highlight_msg() # usage: [format=...] highlight_msg msg
503 510
# format: the # in xfree86.org/current/ctlseqs.html#Character_Attributes
504 511
{

Also available in: Unified diff