Use builtin type to protect against aliases
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user