Revision 9316
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
382 | 382 |
kw_params minor |
383 | 383 |
|
384 | 384 |
log++; if test "$minor"; then log++; fi |
385 |
local script="$(canon_rel_path "${BASH_SOURCE[1]}")" |
|
386 |
echo_cmd "$script:${BASH_LINENO[0]}" "${FUNCNAME[1]}" "$@" |
|
385 |
echo_cmd "$(func_loc "${FUNCNAME[1]}")" "${FUNCNAME[1]}" "$@" |
|
387 | 386 |
can_log |
388 | 387 |
} |
389 | 388 |
alias echo_func='"echo_func" "$@" && indent || true' |
Also available in: Unified diff
lib/sh/util.sh: echo_func(): display where the function was declared (using new func_loc()) instead of where echo_func() was called from. this is more intuitive when debugging, becaues the line # is where the function starts. it also helps remove the dependency on the FUNCNAME/BASH_* arrays, which would produce an inaccurate value if another function call (such as log++) intervened between the caller and echo_func().