-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenv.zsh
36 lines (31 loc) · 1.31 KB
/
env.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/zsh
# populate $PATH to be able to run stuff
# see: https://docs.brew.sh/FAQ#why-should-i-install-homebrew-in-the-default-location
if [[ -e /opt/homebrew ]]; then
HOMEBREW_PREFIX="/opt/homebrew"
elif [[ -e /usr/local ]]; then
HOMEBREW_PREFIX="/usr/local"
elif [[ -e /home/linuxbrew/.linuxbrew ]]; then
HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew"
fi
# If any of the directories exist, set $PATH and others for homebrew
if [[ -n "$HOMEBREW_PREFIX" ]]; then
fpath=($HOMEBREW_PREFIX/share/zsh/site-functions $fpath);
export HOMEBREW_CELLAR="$HOMEBREW_PREFIX/Cellar";
export HOMEBREW_REPOSITORY=$HOMEBREW_PREFIX;
export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin${PATH+:$PATH}";
export MANPATH="$HOMEBREW_PREFIX/share/man${MANPATH+:$MANPATH}:";
export INFOPATH="$HOMEBREW_PREFIX/share/info:${INFOPATH:-}";
export HOMEBREW_NO_ENV_HINTS=TRUE
fi
# source the plugins first, so that p10k instant prompt kicks in
source $ZDOTDIR/zsh_plugins.zsh
# XDG
export DOCKER_CONFIG="$XDG_CONFIG_HOME"/docker
# https://github.com/b3nj5m1n/xdg-ninja/issues/289#issuecomment-1666024202
export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc
export CARGO_HOME="$XDG_DATA_HOME"/cargo
if [[ -e $HOME/.orbstack/shell/init.zsh ]]; then
source ~/.orbstack/shell/init.zsh 2>/dev/null || :
fi
export LESSHISTFILE="$XDG_STATE_HOME"/less/history