Project

General

Profile

« Previous | Next » 

Revision 12722

lib/sh/util.sh: added log! , which force-displays next log message

View differences:

util.sh
438 438
log-() { log+ "-$1" "${@:2}"; }
439 439
log++() { log+ 1 "$@"; }
440 440
log--() { log- 1 "$@"; }
441
log!() { log- "$log_level" "$@"; } # force-displays next log message
441 442
alias log_local=\
442 443
'declare PS4="$PS4" log_level="$log_level" verbosity="$verbosity"'
443 444
alias log+='log_local; "log+"' # don't expand next word because it's not a cmd
444 445
alias log++='log_local; "log++" ' # last space alias-expands next word
445 446
alias log--='log_local; "log--" ' # last space alias-expands next word
447
alias log!='log_local; "log!" ' # last space alias-expands next word
446 448
# no clog+ alias because next word is not a cmd
447 449
alias clog++='"log++" ' # last space alias-expands next word
448 450
alias clog--='"log--" ' # last space alias-expands next word
451
alias clog!='"log!" ' # last space alias-expands next word
449 452

  
450 453
verbosity_min() # usage: verbosity_min {<min>|''}
451 454
# WARNING: '' is a special value that causes $verbosity to be overwritten to ''

Also available in: Unified diff