Revision 12834
Added by Aaron Marcuse-Kubitza almost 11 years ago
trunk/lib/sh/util.sh | ||
---|---|---|
465 | 465 |
} |
466 | 466 |
log+() { log: $((log_level+$1)) "${@:2}"; } |
467 | 467 |
log-() { log+ "-$1" "${@:2}"; } |
468 |
log++() { log+ 1 "$@"; } |
|
469 |
log--() { log- 1 "$@"; } |
|
470 |
log!() { log: 0 "$@"; } # force-displays next log message |
|
471 | 468 |
# no log:/+/- alias needed because next word is not an alias-expandable cmd |
469 |
function log++() { log+ 1 "$@"; } |
|
470 |
function log--() { log- 1 "$@"; } |
|
471 |
function log!() { log: 0 "$@"; } # force-displays next log message |
|
472 | 472 |
alias log++='"log++" ' # last space alias-expands next word |
473 | 473 |
alias log--='"log--" ' # last space alias-expands next word |
474 | 474 |
alias log!='"log!" ' # last space alias-expands next word |
Also available in: Unified diff
fix: lib/sh/util.sh: need `function` before functions that have an alias with the same name