-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathzprofile
More file actions
38 lines (28 loc) · 1.1 KB
/
zprofile
File metadata and controls
38 lines (28 loc) · 1.1 KB
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
37
38
# source /etc/profile
# Determine correct readlink (on mac etc)
READLINK=$(command -v readlink)
if [ -f "$HOME/.nix-profile/bin/readlink" ]; then
READLINK="$HOME/.nix-profile/bin/readlink"
fi
if [ -z "${ZSH_CFG_ROOT:-}" ]; then
ZSH_CFG_ROOT="$(dirname "$("$READLINK" -m "${(%):-%N}")")"
export ZSH_CFG_ROOT
fi
source "$ZSH_CFG_ROOT/rc_functions"
ENCHOST=$(mdh)
[[ -f "$ZSH_CFG_ROOT/hosts/zprofile_pre_$ENCHOST" ]] && source "$ZSH_CFG_ROOT/hosts/zprofile_pre_$ENCHOST"
# source autojump
[[ -s /etc/profile.d/autojump.zsh ]] && source /etc/profile.d/autojump.zsh
# if there is a local version, source it as well
[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && source ~/.autojump/etc/profile.d/autojump.zsh
[[ -d $HOME/.autojump ]] && prepend_root $HOME/.autojump
if command -v lsb_release 2>&1 >/dev/null; then
DISTNAME=$(lsb_release -c -s)
if [ "${DISTNAME}" != "n/a" ]; then
prepend_root $HOME/.local-${DISTNAME}
fi
fi
# prepend_root $HOME/usr
prepend_root $HOME/.local
[[ -f "$ZSH_CFG_ROOT/hosts/zprofile_$ENCHOST" ]] && source "$ZSH_CFG_ROOT/hosts/zprofile_$ENCHOST"
# vim: ft=zsh