Skip to content

Commit 8889c5b

Browse files
committed
Fix paths for Homebrew
Signed-off-by: Timo Sand <[email protected]>
1 parent 17b4d51 commit 8889c5b

File tree

7 files changed

+14
-9
lines changed

7 files changed

+14
-9
lines changed

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def install_zsh_completions
381381
end
382382

383383
def update_antidote
384-
system %(zsh -c 'source ${ZDOTDIR:-~}/.antidote/antidote.zsh; antidote update &; antidote bundle <$HOME/.zsh/plugins/plugins.txt >$HOME/.zsh/plugins.zsh')
384+
system %(zsh -c 'source ${ZDOTDIR:-~}/.antidote/antidote.zsh; antidote update; antidote bundle <$HOME/.zsh/plugins/plugins.txt >$HOME/.zsh/plugins.zsh')
385385
end
386386

387387
def setup_autohosts

config/Asdffile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ plugin tfupdate
3232
plugin yarn
3333
version direnv latest
3434
version helm latest
35+
version python latest
36+
version python 3.12.1 # When updating this version mach it with the version in exports.zsh
3537
# version ruby latest
3638
version nodejs latest
3739
version yarn latest

zprofile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ case $OSTYPE in
2929
darwin*)
3030
COREUTILS_PATH=$BREW_PREFIX/opt/coreutils/libexec/gnubin
3131
PATH=$COREUTILS_PATH:$PATH
32-
[ -x /opt/homebrew/bin/brew ] && eval "$(/opt/homebrew/bin/brew shellenv)"
32+
[ -x $BREW_PREFIX/bin/brew ] && eval "$($BREW_PREFIX/bin/brew shellenv)"
3333
export ARCHFLAGS="-arch x86_64"
3434
;;
3535
*) ;;

zsh/aliases.zsh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ alias gtts="gt trunk && gt sync"
3737
alias gtt="gt trunk"
3838
alias gts="gt sync"
3939
alias gcl="GIT_TEMPLATE_DIR=$HOME/.git_template g cl"
40-
alias j="z"
4140

4241
alias time='gtime -f '\''%Us user %Ss system %es real %MkB mem -- %C'\'
4342

zsh/exports.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export VISUAL=code
1111

1212
export COMPOSE_DOCKER_CLI_BUILD=1
1313
export DOCKER_BUILDKIT=1
14-
export CLOUDSDK_PYTHON=$(asdf where python 3.12.1)/bin/python
14+
export CLOUDSDK_PYTHON=$(asdf where python 3.12.1)/bin/python # When updating this version mach it with the version in Asdffile
1515

16-
export FZF_BASE=/usr/local/opt/fzf
16+
# export FZF_BASE=/usr/local/opt/fzf
1717
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null'
1818
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
1919

zsh/tools.zsh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if type zoxide >/dev/null; then
3333
eval "$(zoxide init zsh --cmd j)"
3434
fi
3535

36-
if [ -d "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/" ]; then
37-
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
38-
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
36+
if [ -d "$BREW_PREFIX/share/google-cloud-sdk" ]; then
37+
source "$BREW_PREFIX/share/google-cloud-sdk/path.zsh.inc"
38+
source "$BREW_PREFIX/share/google-cloud-sdk/completion.zsh.inc"
3939
fi

zshenv

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212

1313
export SYSTEM=$(uname -s)
1414
export ZHISTFILE=.histfile
15-
export BREW_PREFIX=/usr/local
15+
if [[ -n $(whence -p brew) ]]; then
16+
export BREW_PREFIX=$(brew --prefix)
17+
else
18+
export BREW_PREFIX=/opt/homebrew
19+
fi
1620

1721
# https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zshenv
1822
# Ensure that a non-login, non-interactive shell has a defined environment.

0 commit comments

Comments
 (0)