bin/brew: unset functions that override builtins
Also, enable all Bash builtins
This commit is contained in:
parent
5da322d6be
commit
99e308753b
7
bin/brew
7
bin/brew
@ -19,6 +19,13 @@ symlink_target_directory() {
|
|||||||
quiet_cd "$directory" && quiet_cd "$target_dirname" && pwd -P
|
quiet_cd "$directory" && quiet_cd "$target_dirname" && pwd -P
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for cmd in $(compgen -A builtin)
|
||||||
|
do
|
||||||
|
unset -f $cmd # Unset functions that override Bash builtins
|
||||||
|
enable $cmd # Enable all Bash builtins
|
||||||
|
done
|
||||||
|
unset cmd
|
||||||
|
|
||||||
BREW_FILE_DIRECTORY="$(quiet_cd "${0%/*}/" && pwd -P)"
|
BREW_FILE_DIRECTORY="$(quiet_cd "${0%/*}/" && pwd -P)"
|
||||||
HOMEBREW_BREW_FILE="${BREW_FILE_DIRECTORY%/}/${0##*/}"
|
HOMEBREW_BREW_FILE="${BREW_FILE_DIRECTORY%/}/${0##*/}"
|
||||||
HOMEBREW_PREFIX="${HOMEBREW_BREW_FILE%/*/*}"
|
HOMEBREW_PREFIX="${HOMEBREW_BREW_FILE%/*/*}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user