Merge pull request #11930 from XuehaiPan/master
Show all export statements on `brew shellenv` if users modified `PATH` explicitly
This commit is contained in:
commit
5c602003f2
@ -10,7 +10,8 @@
|
|||||||
# HOMEBREW_REPOSITORY is set by bin/brew
|
# HOMEBREW_REPOSITORY is set by bin/brew
|
||||||
# shellcheck disable=SC2154
|
# shellcheck disable=SC2154
|
||||||
homebrew-shellenv() {
|
homebrew-shellenv() {
|
||||||
[[ "${HOMEBREW_SHELLENV_PREFIX}" == "${HOMEBREW_PREFIX}" ]] && return
|
[[ "${HOMEBREW_SHELLENV_PREFIX}" == "${HOMEBREW_PREFIX}" &&
|
||||||
|
"$(PATH="${HOMEBREW_PATH}" command -v brew)" == "${HOMEBREW_PREFIX}/bin/brew" ]] && return
|
||||||
|
|
||||||
case "$(/bin/ps -p "${PPID}" -c -o comm=)" in
|
case "$(/bin/ps -p "${PPID}" -c -o comm=)" in
|
||||||
fish | -fish)
|
fish | -fish)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user