Project

General

Profile

« Previous | Next » 

Revision 9082

bugfix: lib/sh/util.sh: moved self alias to beginning, before functions that use it

View differences:

util.sh
41 41
unalias() { builtin unalias "$@" 2>&- || true; } # no error if undefined
42 42

  
43 43

  
44
#### functions
45

  
46
alias self='command "$FUNCNAME"' # usage: wrapper() { self ...; }
47

  
48

  
44 49
#### exceptions
45 50

  
46 51
# usage: cmd || { save_e; ...; rethrow; }
......
193 198
# echo all external commands
194 199
alias command="echo_run command " # last space alias-expands next word
195 200

  
196
alias self='command "$FUNCNAME"' # usage: wrapper() { self ...; }
197

  
198 201
# commands that are always external
199 202
for cmd in env; do alias "$cmd=command $cmd"; done; unset cmd
200 203

  

Also available in: Unified diff