Revision 8882
Added by Aaron Marcuse-Kubitza over 11 years ago
util.sh | ||
---|---|---|
52 | 52 |
echo "$path" |
53 | 53 |
} |
54 | 54 |
|
55 |
echo_func () |
|
55 |
echo_func_ ()
|
|
56 | 56 |
{ |
57 | 57 |
local script="$(canon_rel_path "${BASH_SOURCE[1]}")" |
58 | 58 |
echo_cmd "$script:${BASH_LINENO[0]}" "${FUNCNAME[1]}" "$@" |
59 | 59 |
} |
60 |
alias echo_func='"echo_func" "$@"' # usage: func () { echo_func; ...; }
|
|
60 |
alias echo_func='echo_func_ "$@"' # usage: func () { echo_func; ...; }
|
|
61 | 61 |
|
62 | 62 |
echo_stdin () # usage: input|echo_stdin|cmd |
63 | 63 |
{ |
Also available in: Unified diff
bugfix: lib/util.sh: renamed echo_func () to echo_func_ (), because you apparently can't have a function with the same name as an alias, even if the function is defined before the alias and an include guard prevents the function from being defined again after the alias is set. there may be some kind of alias-expanding preprocessing pass that bash only does in script mode, or maybe there is some other problem related to our use of aliases inside if statements.