Project

General

Profile

« Previous | Next » 

Revision 13278

bugfix: lib/sh/util.sh: `type` calls: need -- before cmd in case it starts with -

View differences:

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

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

  
323
is_extern() { test "$(type -t "$1")" = file; }
323
is_extern() { test "$(type -t -- "$1")" = file; }
324 324

  
325 325
is_intern() { is_callable "$1" && ! is_extern "$1"; }
326 326

  

Also available in: Unified diff