Revision 9184
Added by Aaron Marcuse-Kubitza over 11 years ago
util.sh | ||
---|---|---|
242 | 242 |
echo_cmd "$script:${BASH_LINENO[0]}" "${FUNCNAME[1]}" "$@" |
243 | 243 |
can_log |
244 | 244 |
} |
245 |
alias echo_func='{ if "echo_func" "$@"; then indent; fi; }'
|
|
246 |
alias echo_minor_func='{ if (log++; "echo_func" "$@"); then indent; fi; }'
|
|
245 |
alias echo_func='"echo_func" "$@" && indent || true'
|
|
246 |
alias echo_minor_func='(log++; "echo_func" "$@") && indent || true'
|
|
247 | 247 |
|
248 | 248 |
## vars |
249 | 249 |
|
Also available in: Unified diff
lib/sh/util.sh: echo_*func aliases: use simpler && syntax (with `|| true` to prevent errexit if the condition is false) instead of an if statement. this also allows prefixing the alias with var definitions.