make brew work on the m1

main
Alpha Chen 3 years ago
parent 948d64d64a
commit 4d3379c69f
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -10,8 +10,6 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; t
source "${ZDOTDIR:-$HOME}/.zprofile" source "${ZDOTDIR:-$HOME}/.zprofile"
fi fi
export PATH="$HOME/.dotfiles/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
if command -v brew &> /dev/null; then if command -v brew &> /dev/null; then
if [[ -s `brew --prefix`/share/chruby/chruby.sh ]]; then if [[ -s `brew --prefix`/share/chruby/chruby.sh ]]; then
source `brew --prefix`/share/chruby/chruby.sh source `brew --prefix`/share/chruby/chruby.sh
@ -23,6 +21,8 @@ if command -v direnv &> /dev/null; then
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
fi fi
if [ -e ~/.nix-profile/etc/profile.d/nix.sh ]; then . ~/.nix-profile/etc/profile.d/nix.sh; fi if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi
if [ -e /Users/alpha/.nix-profile/etc/profile.d/nix.sh ]; then . /Users/alpha/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/etc/profile.d/nix.sh; fi # added by Nix installer
. "$HOME/.cargo/env" if [ -e $HOME/.cargo/env ]; then . "$HOME/.cargo/env"; fi
export PATH="$HOME/.dotfiles/bin:$HOME/.local/bin:$PATH"

@ -33,20 +33,28 @@ alias tmux="direnv exec / tmux"
function eject { command hdiutil eject `df | grep Volumes | grep -i "$@" | ruby -ne 'puts $_[/^[^ ]*/]'`; } function eject { command hdiutil eject `df | grep Volumes | grep -i "$@" | ruby -ne 'puts $_[/^[^ ]*/]'`; }
if [ -e /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
if [ -e /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
brew_prefix=$(brew --prefix)
if [ $commands[chruby] ]; then if [ $commands[chruby] ]; then
chruby ruby chruby ruby
fi fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if [ -e /usr/local/opt/fzf/shell/completion.zsh ]; then if [ -e $brew_prefix/opt/fzf/shell/completion.zsh ]; then
source /usr/local/opt/fzf/shell/key-bindings.zsh source $brew_prefix/opt/fzf/shell/key-bindings.zsh
source /usr/local/opt/fzf/shell/completion.zsh source $brew_prefix/opt/fzf/shell/completion.zsh
fi fi
if [ -e /usr/local/bin/terraform ]; then if [ -e $brew_prefix/bin/terraform ]; then
autoload -U +X bashcompinit && bashcompinit autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/local/bin/terraform terraform complete -o nospace -C $brew_prefix/bin/terraform terraform
fi fi
if [ $commands[fzf] ]; then if [ $commands[fzf] ]; then

Loading…
Cancel
Save