Revision 9719
Added by Aaron Marcuse-Kubitza over 11 years ago
util.sh | ||
---|---|---|
277 | 277 |
|
278 | 278 |
# usage: in func: log++; ... OR log_local; "log++"; ... |
279 | 279 |
# outside func: log++; ...; log-- |
280 |
# before cmd: log++ cmd... OR "log++" "log++" cmd...
|
|
280 |
# before cmd: log++ cmd... OR log+ # cmd... OR "log++" "log++" cmd...
|
|
281 | 281 |
# with a cmd, assignments are applied just to it, so log_local is not needed |
282 | 282 |
# without a cmd, "$@" expands to nothing and assignments are applied to caller |
283 | 283 |
# "${@:2}" expands to all of $@ after *1st* arg, not 2nd ($@ indexes start at 1) |
Also available in: Unified diff
lib/sh/util.sh: log++: before cmd: documented how to use it as `log+ #` when incrementing multiple log_levels at once (this is a better method than `"log++" "log++" ...`)