-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshenv
88 lines (74 loc) · 2.28 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
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
# -------------------------------------
# Path
# -------------------------------------
export PATH
export MANPATH
# -U: keep only the first occurrence of each duplicated value
# ref. http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html#index-typeset
typeset -U PATH path cdpath fpath MANPATH manpath
# ignore /etc/zprofile, /etc/zshrc, /etc/zlogin, and /etc/zlogout
# ref. http://zsh.sourceforge.net/Doc/Release/Files.html
# ref. http://zsh.sourceforge.net/Doc/Release/Options.html#index-GLOBALRCS
unsetopt GLOBAL_RCS
# copied from /etc/zprofile
# system-wide environment settings for zsh(1)
if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi
# GNU/Linux commands installed via homebrew
# ref https://qiita.com/eumesy/items/3bb39fc783c8d4863c5f
path=(
/usr/local/bin(N-/) # homebrew
/usr/local/sbin(N-/) # homebrew
/opt/homebrew/bin(N-/) # homebrew
/opt/homebrew/sbin(N-/) # homebrew
/usr/local/opt/coreutils/libexec/gnubin(N-/) # coreutils
/usr/local/opt/ed/libexec/gnubin(N-/) # ed
/usr/local/opt/findutils/libexec/gnubin(N-/) # findutils
/usr/local/opt/gnu-sed/libexec/gnubin(N-/) # sed
/usr/local/opt/gnu-tar/libexec/gnubin(N-/) # tar
/usr/local/opt/grep/libexec/gnubin(N-/) # grep
${path}
)
manpath=(
/usr/local/share/man(N-/) # homebrew
/usr/local/opt/coreutils/libexec/gnuman(N-/) # coreutils
/usr/local/opt/ed/libexec/gnuman(N-/) # ed
/usr/local/opt/findutils/libexec/gnuman(N-/) # findutils
/usr/local/opt/gnu-sed/libexec/gnuman(N-/) # sed
/usr/local/opt/gnu-tar/libexec/gnuman(N-/) # tar
/usr/local/opt/grep/libexec/gnuman(N-/) # grep
${manpath}
)
# -------------------------------------
# Environment variables
# -------------------------------------
# LANG
export LANG=ja_JP.UTF-8
case ${UID} in
0)
LANG=C
;;
esac
# Locale
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# pager
export PAGER=/usr/bin/less
export MANPAGER=/usr/bin/less
# golang
export GOPATH="$HOME/works"
export PATH="$GOPATH/bin:$PATH"
# Mackerel CLI
if [ -e /usr/local/bin/mkrg ]; then
source $HOME/.mackerel
export MKRG_VIEWER=iTerm2
fi
# GPG
export GPG_TTY=$(tty)
# Python
export PATH="$HOME/.local/bin:$PATH"
# mise
export MISE_NODE_COREPACK=1
# brew
export HOMEBREW_VERIFY_ATTESTATIONS=1