Revision 8907
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/util.sh | ||
---|---|---|
24 | 24 |
|
25 | 25 |
unalias () { builtin unalias "$@" 2>&- || true; } # no error if undefined |
26 | 26 |
|
27 |
extern () { (unset -f "$1"; "$@") || exit; } |
|
27 |
function extern () { (unset -f "$1"; "$@") || exit; }
|
|
28 | 28 |
|
29 | 29 |
#### exceptions |
30 | 30 |
|
... | ... | |
76 | 76 |
|
77 | 77 |
echo_run_extern () { (log_stderr; echo_run extern "$@") || exit; } |
78 | 78 |
|
79 |
alias extern="echo_run_extern" # automatically echo external commands |
|
80 |
|
|
79 | 81 |
if test "$verbosity" -ge 1; then |
80 | 82 |
alias env="echo_run env" # automatically echo commands that use env |
81 | 83 |
fi |
Also available in: Unified diff
lib/util.sh: automatically echo external commands. this requires using the function keyword when declaring extern () so that the new extern alias is not expanded in the function name.