From 2f4d4b8684c409d548f5a8a97ecf93accf3b22e5 Mon Sep 17 00:00:00 2001 From: Niklas Herder Date: Wed, 29 Apr 2020 08:20:06 +0200 Subject: [PATCH] [fix] Improve shell detection in shellenv $SHELL is set to only the binary name in some environments (e.g. fish, not /usr/bin/fish), causing detection of fish/csh/tsch to fail without this change. --- Library/Homebrew/cmd/shellenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/shellenv.sh b/Library/Homebrew/cmd/shellenv.sh index d1dd7db8b0..b478b6fcf4 100644 --- a/Library/Homebrew/cmd/shellenv.sh +++ b/Library/Homebrew/cmd/shellenv.sh @@ -7,7 +7,7 @@ homebrew-shellenv() { case "$SHELL" in - */fish) + */fish|fish) echo "set -gx HOMEBREW_PREFIX \"$HOMEBREW_PREFIX\";" echo "set -gx HOMEBREW_CELLAR \"$HOMEBREW_CELLAR\";" echo "set -gx HOMEBREW_REPOSITORY \"$HOMEBREW_REPOSITORY\";" @@ -15,7 +15,7 @@ homebrew-shellenv() { echo "set -q MANPATH; or set MANPATH ''; set -gx MANPATH \"$HOMEBREW_PREFIX/share/man\" \$MANPATH;" echo "set -q INFOPATH; or set INFOPATH ''; set -gx INFOPATH \"$HOMEBREW_PREFIX/share/info\" \$INFOPATH;" ;; - */csh|*/tcsh) + */csh|csh|*/tcsh|tcsh) echo "setenv HOMEBREW_PREFIX $HOMEBREW_PREFIX;" echo "setenv HOMEBREW_CELLAR $HOMEBREW_CELLAR;" echo "setenv HOMEBREW_REPOSITORY $HOMEBREW_REPOSITORY;"