-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdot_zshrc.tmpl
62 lines (48 loc) · 1018 Bytes
/
dot_zshrc.tmpl
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
if [[ ! -o interactive ]]; then
# non-interactive, return
return
fi
export shellHome=$HOME/.config/shellrc
# Load all files from the posix.d directory
if [ -d $shellHome/posix.d ]; then
for file in $shellHome/posix.d/*.sh; do
source $file
done
fi
# Load all files from the zsh.d directory
if [ -d $shellHome/zsh.d ]; then
for file in $shellHome/zsh.d/*.zsh; do
source $file
done
fi
# Environment helpers
{{ if eq .setup_mamba "yes" }}
eval "$(micromamba shell hook --shell=zsh)"
{{ end }}
{{ if eq .use_rust "yes" -}}
eval "$(starship init zsh)"
eval "$(zoxide init zsh --cmd Z)"
{{ end }}
# Common Zsh #
if [ ! -f ~/.zshrc.zwc -o ~/.zshrc -nt ~/.zshrc.zwc ]; then
zcompile ~/.zshrc
fi
# Platform
#############
if [ -f ~/.zshPlatform ]; then
. ~/.zshPlatform
fi
# Specifics
#############
if [ -f ~/.zshSpecifics ]; then
. ~/.zshSpecifics
fi
# HPC
#######
if [ -f ~/.zshlmod ]; then
. ~/.zshlmod
fi
# Emacs Stuff (cross platform)
# Local Variables:
# mode: shell-script
# End: