Use builtin type to protect against aliases

This commit is contained in:
Nathan Broadbent
2012-11-17 11:42:33 +13:00
parent 0a797fb620
commit 3dcf934a75

View File

@@ -14,9 +14,9 @@ _alias(){ alias "$@" 2> /dev/null; }
find_binary(){ find_binary(){
if [ $shell = "zsh" ]; then if [ $shell = "zsh" ]; then
type -p "$1" | sed "s/$1 is //" | head -1 builtin type -p "$1" | sed "s/$1 is //" | head -1
else else
type -P "$1" builtin type -P "$1"
fi fi
} }