Project

General

Profile

« Previous | Next » 

Revision 13271

bugfix: lib/sh/util.sh: type(): need to handle options before command name

View differences:

trunk/lib/sh/util.sh
315 315

  
316 316
#### commands
317 317

  
318
type() { (unalias "$1"; self_builtin "$1") || return; } # alias already expanded
318
type() # handles fact that any alias would already be expanded
319
{ (unalias "$(1st_non_opt "$@")"; self_builtin "$@") || return; }
319 320

  
320 321
is_callable() { type -t "$1" >/dev/null; }
321 322

  

Also available in: Unified diff