Revision 9677
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/util.sh | ||
---|---|---|
107 | 107 |
|
108 | 108 |
pf() { declare -f "$@"; } # usage: pf function (prints func decl for debugging) |
109 | 109 |
|
110 |
all_funcs() # usage: for func in $(all_funcs); do ...; done # all declared funcs |
|
111 |
{ declare -F|while read -r line; do echo -n "${line#declare -f } "; done; } |
|
110 | 112 |
|
113 |
|
|
111 | 114 |
#### exceptions |
112 | 115 |
|
113 | 116 |
# usage: cmd || { save_e; ...; rethrow; } |
Also available in: Unified diff
lib/sh/util.sh: added all_funcs(), which lists all declared functions