-
Notifications
You must be signed in to change notification settings - Fork 34
/
env.zsh
95 lines (82 loc) · 1.46 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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#
# dotzsh : https://github.com/dotphiles/dotzsh
#
# Defines environment variables.
#
# Authors:
# Ben O'Hara <[email protected]>
#
export DOTZSH_VERSION=$(head -1 "$DOTZSH/.dotzsh")
# Paths
typeset -gU cdpath fpath mailpath manpath path
typeset -gUT INFOPATH infopath
# Set the the list of directories that cd searches.
cdpath=(
$cdpath
)
# Set the list of directories that info searches for manuals.
infopath=(
/usr/local/share/info
/usr/share/info
$infopath
)
# Set the list of directories that man searches for manuals.
manpath=(
/usr/local/share/man
/usr/share/man
$manpath
)
for path_file in /etc/manpaths.d/*(.N); do
manpath+=($(<$path_file))
done
unset path_file
# Set the list of directories that Zsh searches for programs.
path=(
/usr/local/{bin,sbin}
/usr/{bin,sbin}
/{bin,sbin}
~/bin
$path
)
for path_file in /etc/paths.d/*(.N); do
path+=($(<$path_file))
done
unset path_file
# MacOSX
if [[ "$OSTYPE" = darwin* && -d /opt/local ]]; then
infopath=(
/opt/local/share/info
$infopath
)
manpath=(
/opt/local/share/man
$manpath
)
path=(
/opt/local/{bin,sbin}
$path
)
fi
# Solaris
if [[ "$OSTYPE" = solaris* ]]; then
infopath=(
/usr/gnu/share/info
$infopath
)
manpath=(
/usr/gnu/share/man
$manpath
)
path=(
/usr/gnu/bin
$path
)
fi
# Language
if [[ -z "$LANG" ]]; then
eval "$(locale)"
fi
# Browser (Default)
if [[ "$OSTYPE" == darwin* ]]; then
export BROWSER='open'
fi