-
Notifications
You must be signed in to change notification settings - Fork 4
/
.zshenv
150 lines (118 loc) · 2.86 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#!/usr/local/bin/zsh
# profile
# zmodload zsh/zprof && zprof
export XDG_CONFIG_DIR=$HOME/.config
# language
export LANG=ja_JP.UTF-8
# editor
export EDITOR=nvim
export VISUAL=nvim
alias vi=nvim
# lambdalisue/vim-manpager
export MANPAGER='nvim -c ASMANPAGER -'
# Disable path_helper
# show: http://qiita.com/t-takaai/items/8574ff312f2caa5177c2
setopt no_global_rcs
typeset -U path fpath
# default path
path=(~/.config/yarn/global/node_modules/.bin(N-/) /usr/local/bin(N-/) /usr/bin(N-/) /bin(N-/) /sbin(N-/) /usr/sbin(N-/) /usr/local/sbin(N-/) /usr/X11/bin(N-/) ~/.bin(N-/))
fpath=(~/.zsh/completions(N-/) $fpath)
# OpenSSL
path=(/usr/local/opt/openssl/bin(N-/) $path)
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
# homebrew
alias brew="PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin brew"
# zinit
ZPLG_HOME=$HOME/.zinit
ZPFX=$ZPLG_HOME/polaris
path=($ZPFX/bin(N-/) $path)
# popd
alias p=popd
# curl
path=(/usr/local/opt/curl/bin(N-/) $path)
# ripgrep
export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/rc
# XDG Base Directory
export XDG_CONFIG_HOME=$HOME/.config
# gtags
export GTAGSLABEL=pygments
# rbenv
path=(~/.rbenv/shims(N-/) $path)
export RBENV_SHELL=zsh
function rbenv() {
local command
command="$1"
if [[ "$#" -gt 0 ]]; then
shift
fi
case "$command" in
rehash|shell)
eval "$(rbenv "sh-$command" "$@")";;
*)
command rbenv "$command" "$@";;
esac
}
# python2
path=(/usr/local/opt/python@2/bin(N-/) $path)
# pyenv
path=(~/.pyenv/shims(N-/) $path)
export PYENV_ROOT=~/.pyenv
export PYENV_SHELL=zsh
export PYTHON_CONFIGURE_OPTS='--enable-framework'
pyenv() {
local command
command="$1"
if [[ "$#" -gt 0 ]]; then
shift
fi
case "$command" in
rehash|shell)
eval "$(pyenv "sh-$command" "$@")";;
*)
command pyenv "$command" "$@";;
esac
}
# nodenv
path=(~/.nodenv/shims(N-/) $path)
export NODENV_SHELL=zsh
nodenv() {
local command
command="$1"
if [[ "$#" -gt 0 ]]; then
shift
fi
case "$command" in
rehash|shell)
eval "$(nodenv "sh-$command" "$@")";;
*)
command nodenv "$command" "$@";;
esac
}
# deno
path=(~/.deno/bin(N-/) $path)
# Rust
if [[ -d "$HOME/.cargo" ]]; then
path=(~/.cargo/bin(N-/) $path)
source "$HOME/.cargo/env"
fi
# go
export GOPATH=$HOME/.go
path=(~/.go/bin(N-/) ~/.ghg/bin(N-/) $path)
# java
export JAVA_HOME=$(/usr/libexec/java_home -v "14")
# llvm
path=(/usr/local/opt/llvm/bin(N-/) $path)
# direnv
if whence direnv > /dev/null; then
_direnv_hook() {
eval "$(direnv export zsh)";
}
typeset -ag precmd_functions;
if [[ -z ${precmd_functions[(r)_direnv_hook]} ]]; then
precmd_functions+=(_direnv_hook);
fi
fi
# Finally add the path of ~/bin and ~/dotfiles/bin to the beginning
path=(~/bin(N-/) $path)
path=(~/dotfiles/bin(N-/) $path)
# vim:set expandtab shiftwidth=2 softtabstop=2 tabstop=2 foldenable foldmethod=marker: