[ZSH] Path fixes
This commit is contained in:
@@ -8,11 +8,11 @@ defaults write .GlobalPreferences AppleLocale en_DE
|
|||||||
|
|
||||||
ARCH=`uname -m`
|
ARCH=`uname -m`
|
||||||
if [[ $ARCH == "arm64" ]]; then
|
if [[ $ARCH == "arm64" ]]; then
|
||||||
HOMEBREWPREFIX="/opt/homebrew"
|
export HOMEBREW_PREFIX="/opt/homebrew"
|
||||||
else
|
else
|
||||||
HOMEBREWPREFIX="/usr/local"
|
export HOMEBREW_PREFIX="/usr/local"
|
||||||
fi
|
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"
|
# 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";
|
source "$HOMEBREW_COMMAND_NOT_FOUND_HANDLER";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export DYLD_FALLBACK_LIBRARY_PATH="$HOMEBREW_PREFIX/lib:${DYLD_FALLBACK_LIBRARY_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}"
|
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}"
|
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 claude="workon claude; claude; deactivate"
|
||||||
alias python="python3"
|
alias python="python3"
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -146,9 +146,9 @@ delzip() {
|
|||||||
export MITMPROXY_SSLKEYLOGFILE="~/.mitmproxy/sslkeylogfile.txt"
|
export MITMPROXY_SSLKEYLOGFILE="~/.mitmproxy/sslkeylogfile.txt"
|
||||||
|
|
||||||
[[ -f ~/.zsh/.mac_config.zsh ]] && source ~/.zsh/.mac_config.zsh
|
[[ -f ~/.zsh/.mac_config.zsh ]] && source ~/.zsh/.mac_config.zsh
|
||||||
if `which go &>/dev/null`; then
|
if (( $+commands[go] )); then
|
||||||
export PATH="$PATH:$(go env GOPATH)/bin"
|
export GOPATH="$(go env GOPATH 2>/dev/null)"
|
||||||
export GOPATH=$(go env GOPATH)
|
[[ -n "$GOPATH" ]] && path+=("$GOPATH/bin")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use safecp/safemv from the tools-repo when available (after ~/.local/bin is on PATH)
|
# 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
|
# https://github.com/zsh-users/zsh-autosuggestions/issues/351
|
||||||
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
|
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(bracketed-paste)
|
||||||
export PATH=$PATH:/Users/ising/.runai/bin
|
[[ -d "$HOME/.lmstudio/bin" ]] && path+=("$HOME/.lmstudio/bin")
|
||||||
runai_bin=/Users/ising/.runai/bin/runai
|
[[ -d "$HOME/.runai/bin" ]] && path+=("$HOME/.runai/bin")
|
||||||
|
runai_bin="$HOME/.runai/bin/runai"
|
||||||
runai_completion=${ZDOTDIR:-$HOME}/.cache/zsh/runai-completion.zsh
|
runai_completion=${ZDOTDIR:-$HOME}/.cache/zsh/runai-completion.zsh
|
||||||
if [[ -x "$runai_bin" ]]; then
|
if [[ -x "$runai_bin" ]]; then
|
||||||
if [[ ! -s "$runai_completion" || "$runai_bin" -nt "$runai_completion" ]]; 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
|
# 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
|
# 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
|
# 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
|
# PATH) that snapshot would be incomplete and `deactivate` would strip
|
||||||
# ~/.local/bin & friends — dropping claude and co. off PATH. Keeping this last
|
# ~/.local/bin & friends — dropping claude and co. off PATH. Keeping this last
|
||||||
# guarantees the snapshot is the fully-built PATH.
|
# 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
|
# 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.
|
# force the base environment; drop that empty value so nothing sees a bogus venv.
|
||||||
|
typeset -U path PATH
|
||||||
[ -z "${VIRTUAL_ENV:-}" ] && unset VIRTUAL_ENV
|
[ -z "${VIRTUAL_ENV:-}" ] && unset VIRTUAL_ENV
|
||||||
if [ -n "$VIRTUAL_ENV" ] && [ -f "$VIRTUAL_ENV/bin/activate" ]; then
|
if [ -n "$VIRTUAL_ENV" ] && [ -f "$VIRTUAL_ENV/bin/activate" ]; then
|
||||||
# Guard against double-activation on a manual `source ~/.zshrc`.
|
# Guard against double-activation on a manual `source ~/.zshrc`.
|
||||||
|
|||||||
Reference in New Issue
Block a user