[ZSH] Path fixes
This commit is contained in:
+8
-6
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user