Allow Homebrew path detection under arm64e
This commit is contained in:
parent
cbba7ae456
commit
041f800f96
2 changed files with 35 additions and 26 deletions
57
zshrc
57
zshrc
|
@ -57,21 +57,17 @@ if [ -d ${HOME}/bin/android-sdk ]; then
|
||||||
export PATH="${HOME}/bin/android-sdk/platform-tools:${PATH}"
|
export PATH="${HOME}/bin/android-sdk/platform-tools:${PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Google Cloud tools
|
# Go
|
||||||
if [ -d ${HOME}/bin/google-cloud-sdk ]; then
|
if [ -d ${HOME}/go ]; then
|
||||||
source ${HOME}/bin/google-cloud-sdk/path.zsh.inc
|
export GOPATH=${HOME}/go
|
||||||
|
export PATH=${GOPATH}/bin:${PATH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# iTerm2 integration, only if detected as installed
|
|
||||||
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
|
|
||||||
|
|
||||||
# Go
|
|
||||||
export GOPATH=${HOME}/go
|
|
||||||
export PATH=${GOPATH}/bin:${PATH}
|
|
||||||
|
|
||||||
# theos
|
# theos
|
||||||
export THEOS=${HOME}/.theos
|
if [ -d ${HOME}/.theos ]; then
|
||||||
export PATH=${THEOS}/bin:$PATH
|
export THEOS=${HOME}/.theos
|
||||||
|
export PATH=${THEOS}/bin:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
# devkitPro and the like
|
# devkitPro and the like
|
||||||
if [ -d /opt/devkitpro ]; then
|
if [ -d /opt/devkitpro ]; then
|
||||||
|
@ -81,19 +77,31 @@ if [ -d /opt/devkitpro ]; then
|
||||||
export PATH=/opt/devkitpro/tools/bin:$PATH
|
export PATH=/opt/devkitpro/tools/bin:$PATH
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
|
|
||||||
if [ -s /etc/profile.d/vte.sh ]; then
|
|
||||||
source /etc/profile.d/vte.sh
|
|
||||||
elif [ -s /etc/profile.d/vte-2.91.sh ]; then
|
|
||||||
source /etc/profile.d/vte-2.91.sh
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $OSTYPE == darwin* ]]; then
|
if [[ $OSTYPE == darwin* ]]; then
|
||||||
# Fix Homebrew pathing.
|
# Under x86_64, we assume brew is in /usr/local.
|
||||||
export PATH="/usr/local/bin:/usr/local/sbin:${PATH}"
|
# However, under arm64e, it may be under /opt/homebrew.
|
||||||
# Fix ZSH site-functions pathing due to Homebrew.
|
# Alternatively, the user may not have Homebrew installed
|
||||||
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
|
# whatsoever, in which nothing needs to be done.
|
||||||
|
# (By user, I mean me, and the occasional VM.)
|
||||||
|
if [ -f /usr/local/bin/brew ]; then
|
||||||
|
BREW_PREFIX="/usr/local"
|
||||||
|
BREW_FOUND=true
|
||||||
|
elif [ -f /opt/homebrew/bin/brew ]; then
|
||||||
|
BREW_PREFIX="/opt/homebrew"
|
||||||
|
BREW_FOUND=true
|
||||||
|
else
|
||||||
|
BREW_FOUND=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
if $BREW_FOUND; then
|
||||||
|
# Ensure Homebrew can be found within the path.
|
||||||
|
export PATH="${BREW_PREFIX}/bin:${BREW_PREFIX}/sbin:${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Under Darwin, we also want iTerm2 integration if possible.
|
||||||
|
if [ -f ${HOME}/.iterm2_shell_integration.zsh ]; then
|
||||||
|
source "${HOME}/.iterm2_shell_integration.zsh"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Personal preferences
|
# Personal preferences
|
||||||
|
@ -127,5 +135,6 @@ compinit
|
||||||
# Google Cloud tries to prematurely call compinit for completion.
|
# Google Cloud tries to prematurely call compinit for completion.
|
||||||
# I don't want >1 second load times.
|
# I don't want >1 second load times.
|
||||||
if [ -d ${HOME}/bin/google-cloud-sdk ]; then
|
if [ -d ${HOME}/bin/google-cloud-sdk ]; then
|
||||||
|
source ${HOME}/bin/google-cloud-sdk/path.zsh.inc
|
||||||
source ${HOME}/bin/google-cloud-sdk/completion.zsh.inc
|
source ${HOME}/bin/google-cloud-sdk/completion.zsh.inc
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue