Project

General

Profile

« Previous | Next » 

Revision 13227

fix: lib/sh/util.sh: self_builtin: avoid $() so that $? isn't modified

View differences:

trunk/lib/sh/util.sh
218 218

  
219 219
alias self='command "$(self_name)"' # usage: wrapper() { self ...; }
220 220
alias self_sys='sys_cmd "$(self_name)"' # wrapper() { self_sys ...; }
221
alias self_builtin='builtin "$(self_name)"' # wrapper() { self_builtin ...; }
221
alias self_builtin='builtin "${FUNCNAME%%__*}"' #wrapper() { self_builtin ...; }
222 222

  
223 223
all_funcs() # usage: for func in $(all_funcs); do ...; done # all declared funcs
224 224
{ declare -F|while read -r line; do echo -n "${line#declare -f } "; done; }

Also available in: Unified diff