forked from holman/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 6
/
dot_zshrc.tmpl
72 lines (55 loc) · 1.21 KB
/
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
63
64
65
66
67
68
69
70
71
72
## Gowie Zsh Config
####################
{{ if eq .chezmoi.os "darwin" -}}
## Mac
##############
{{ range .pathenv.darwin -}}
export PATH="{{ . }}:$PATH"
{{ end -}}
{{ range .env.darwin -}}
export {{ .name }}="{{ .value }}"
{{ end -}}
{{ range .aliases.darwin -}}
alias {{ .alias }}="{{ .command }}"
{{ end -}}
{{ else if eq .chezmoi.os "linux" -}}
## Linux
##############
{{ range .pathenv.linux -}}
export PATH="{{ . }}:$PATH"
{{ end -}}
{{ range .env.linux -}}
export {{ .name }}="{{ .value }}"
{{ end -}}
{{ range .aliases.linux -}}
alias {{ .alias }}="{{ .command }}"
{{ end -}}
{{ else if eq .chezmoi.os "windows" -}}
## Windows
##############
{{ range .pathenv.windows -}}
export PATH="{{ . }}:$PATH"
{{ end -}}
{{ range .env.windows -}}
export {{ .name }}="{{ .value }}"
{{ end -}}
{{ range .aliases.windows -}}
alias {{ .alias }}="{{ .command }}"
{{ end -}}
{{ end -}} # End if OS
## All
##############
{{ range .pathenv.all -}}
export PATH="{{ . }}:$PATH"
{{ end -}}
{{ range .env.all -}}
export {{ .name }}="{{ .value }}"
{{ end -}}
{{ range .aliases.all -}}
alias {{ .alias }}="{{ .command }}"
{{ end -}}
# Load all functions + raw files
for file in $(chezmoi source-path)/loaders/**/*(.);
do
source $file
done