-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathzshenv
34 lines (29 loc) · 1.05 KB
/
zshenv
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
# `zshenv` is things for all shells
# Don't load the rest of this file if it has already been sourced in particular
# this was added to prevent the path from being re-ordered when a `zsh`
# subshell is started (`vim` does this).
if [[ -v ZSHENV_SOURCED ]]; then
return
fi
export ZSHENV_SOURCED=1
# This helps with some issues with mosh, e.g., utf-8 support and specifying
# locale
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8
# Note that `~/.brew/bin` *must* be set here so that the brew installed version
# of `mosh` gets picked up that supports truecolor
if [[ "$TERM_PROGRAM" = "Apple_Terminal" ]]; then
# The other method doesn't work in Apple Terminal for some reason?
export PATH=~/.brew/bin:~/.bin:$PATH
else
# This method of setting the path prevents duplicate entries.
typeset -U path
path=(~/.brew/bin ~/.bin $path[@])
fi
# The `-U` option prevents duplicates when `tmux` starts `zsh` instances
export -U PATH
# Allow custom man pages
export MANPATH=$MANPATH:$HOME/.man
export -U MANPATH