make brew work on the m1

Alpha Chen 3 years ago
parent d1852dca3a
commit 691c448cac

@ -10,8 +10,6 @@ if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; t
source "${ZDOTDIR:-$HOME}/.zprofile"
fi
export PATH="$HOME/.dotfiles/bin:$HOME/.cargo/bin:/usr/local/bin:$HOME/.local/bin:$PATH"
if command -v brew &> /dev/null; then
if [[ -s `brew --prefix`/share/chruby/chruby.sh ]]; then
source `brew --prefix`/share/chruby/chruby.sh
@ -23,6 +21,8 @@ if command -v direnv &> /dev/null; then
eval "$(direnv hook zsh)"
fi
if [ -e ~/.nix-profile/etc/profile.d/nix.sh ]; then . ~/.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
. "$HOME/.cargo/env"
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/etc/profile.d/nix.sh; fi # added by Nix installer
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 $_[/^[^ ]*/]'`; }
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
chruby ruby
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if [ -e /usr/local/opt/fzf/shell/completion.zsh ]; then
source /usr/local/opt/fzf/shell/key-bindings.zsh
source /usr/local/opt/fzf/shell/completion.zsh
if [ -e $brew_prefix/opt/fzf/shell/completion.zsh ]; then
source $brew_prefix/opt/fzf/shell/key-bindings.zsh
source $brew_prefix/opt/fzf/shell/completion.zsh
fi
if [ -e /usr/local/bin/terraform ]; then
if [ -e $brew_prefix/bin/terraform ]; then
autoload -U +X bashcompinit && bashcompinit
complete -o nospace -C /usr/local/bin/terraform terraform
complete -o nospace -C $brew_prefix/bin/terraform terraform
fi
if [ $commands[fzf] ]; then

Loading…
Cancel
Save