[ZSH] Path fixes

This commit is contained in:
Fabian Ising
2026-07-27 10:39:34 +02:00
parent 5b3b61e0e0
commit 7ccb268cfb
2 changed files with 14 additions and 12 deletions
+6 -6
View File
@@ -8,11 +8,11 @@ defaults write .GlobalPreferences AppleLocale en_DE
ARCH=`uname -m`
if [[ $ARCH == "arm64" ]]; then
HOMEBREWPREFIX="/opt/homebrew"
export HOMEBREW_PREFIX="/opt/homebrew"
else
HOMEBREWPREFIX="/usr/local"
export HOMEBREW_PREFIX="/usr/local"
fi
export PATH="$HOMEBREWPREFIX/opt/coreutils/libexec/gnubin:$HOME/.local/bin:$HOMEBREWPREFIX/bin:$PATH:$HOMEBREWPREFIX/sbin"
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$HOME/.local/bin:$HOMEBREW_PREFIX/bin:$PATH:$HOMEBREW_PREFIX/sbin"
# test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
@@ -27,9 +27,9 @@ if [ -f "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER" ]; then
source "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER";
fi
export DYLD_FALLBACK_LIBRARY_PATH="$HOMEBREW_PREFIX/lib:${DYLD_FALLBACK_LIBRARY_PATH}"
export GI_TYPELIB_PATH="$HOMEBREW_PREFIX/lib/girepository-1.0:${GI_TYPELIB_PATH}"
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/lib/pkgconfig:$HOMEBREW_PREFIX/share/pkgconfig:${PKG_CONFIG_PATH}"
export DYLD_FALLBACK_LIBRARY_PATH="$HOMEBREW_PREFIX/lib${DYLD_FALLBACK_LIBRARY_PATH:+:$DYLD_FALLBACK_LIBRARY_PATH}"
export GI_TYPELIB_PATH="$HOMEBREW_PREFIX/lib/girepository-1.0${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/lib/pkgconfig:$HOMEBREW_PREFIX/share/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
alias claude="workon claude; claude; deactivate"
alias python="python3"
+8 -6
View File
@@ -146,9 +146,9 @@ delzip() {
export MITMPROXY_SSLKEYLOGFILE="~/.mitmproxy/sslkeylogfile.txt"
[[ -f ~/.zsh/.mac_config.zsh ]] && source ~/.zsh/.mac_config.zsh
if `which go &>/dev/null`; then
export PATH="$PATH:$(go env GOPATH)/bin"
export GOPATH=$(go env GOPATH)
if (( $+commands[go] )); then
export GOPATH="$(go env GOPATH 2>/dev/null)"
[[ -n "$GOPATH" ]] && path+=("$GOPATH/bin")
fi
# Use safecp/safemv from the tools-repo when available (after ~/.local/bin is on PATH)
@@ -205,8 +205,9 @@ zstyle :bracketed-paste-magic paste-finish pastefinish
# https://github.com/zsh-users/zsh-autosuggestions/issues/351
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
export PATH=$PATH:/Users/ising/.runai/bin
runai_bin=/Users/ising/.runai/bin/runai
[[ -d "$HOME/.lmstudio/bin" ]] && path+=("$HOME/.lmstudio/bin")
[[ -d "$HOME/.runai/bin" ]] && path+=("$HOME/.runai/bin")
runai_bin="$HOME/.runai/bin/runai"
runai_completion=${ZDOTDIR:-$HOME}/.cache/zsh/runai-completion.zsh
if [[ -x "$runai_bin" ]]; then
if [[ ! -s "$runai_completion" || "$runai_bin" -nt "$runai_completion" ]]; then
@@ -226,7 +227,7 @@ fi
# in via `-e VIRTUAL_ENV=...`, see .tmux.conf) we source the venv's activate
# script here rather than in .virtual_env_config.zsh. activate snapshots the
# current PATH into _OLD_VIRTUAL_PATH and restores it on `deactivate`; if we
# activated earlier (before .mac_config.zsh, go, runai below all prepend to
# activated earlier (before .mac_config.zsh, Go, Run:AI, and LM Studio mutate
# PATH) that snapshot would be incomplete and `deactivate` would strip
# ~/.local/bin & friends — dropping claude and co. off PATH. Keeping this last
# guarantees the snapshot is the fully-built PATH.
@@ -235,6 +236,7 @@ fi
#
# A new tmux window clears the var to empty (`bind c ... -e VIRTUAL_ENV=`) to
# force the base environment; drop that empty value so nothing sees a bogus venv.
typeset -U path PATH
[ -z "${VIRTUAL_ENV:-}" ] && unset VIRTUAL_ENV
if [ -n "$VIRTUAL_ENV" ] && [ -f "$VIRTUAL_ENV/bin/activate" ]; then
# Guard against double-activation on a manual `source ~/.zshrc`.