Felipe Contreras wrote: > René Scharfe wrote: > > And then I wondered why use declare -f, which prints the function's > > body, when there is -F, which just prints the function's name. And why > > repeat /dev/null when redirecting stderr when the more shorter 2>&1 > > would do the same? None of hat was introduced by you patch, of course. > > Anyway, this seems to work for me: > > > > __git_have_func () { > > case "$1" in > > -*) return 1 ;; > > esac > > declare -F "$1" >/dev/null 2>&1 > > } Actually... How about: declare -F -- "$1" >/dev/null 2>&1 ? -- Felipe Contreras