From 16100e5949fde1ccfb6a69a8ae97dbe28dedb161 Mon Sep 17 00:00:00 2001 From: Ilia Mikhailov Date: Fri, 26 Apr 2013 13:16:54 +0200 Subject: [PATCH] Changed type checking func to be locale independent --- lib/helpers.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helpers.bash b/lib/helpers.bash index b99ae3d3..03b7e441 100644 --- a/lib/helpers.bash +++ b/lib/helpers.bash @@ -44,6 +44,7 @@ bash-it () typeset component=${1:-} shift typeset func + case $verb in show) func=_bash-it-$component;; @@ -80,7 +81,7 @@ _is_function () _about 'sets $? to true if parameter is the name of a function' _param '1: name of alleged function' _group 'lib' - [ -n "$(type -a $1 2>/dev/null | grep 'is a function')" ] + [ -n "$(type -t $1 2>/dev/null | grep 'function')" ] } _bash-it-aliases ()