Fixed #157: Made 'type' command using default LANG (not system LANG) to check if function or alias.

This commit is contained in:
Benjamin Brombach
2014-12-03 12:42:54 +01:00
parent 86eba5c436
commit 4b60298939
2 changed files with 2 additions and 2 deletions

View File

@@ -235,7 +235,7 @@ draft ()
fi
# aliases bind tighter than function names, disallow them
if [ -n "$(type -a $func 2>/dev/null | grep 'is.*alias')" ]; then
if [ -n "$(LANG=C type -t $func 2>/dev/null | grep 'alias')" ]; then
printf '%s\n' "sorry, $(type -a $func). please choose another name."
return
fi