-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshenv
129 lines (100 loc) · 3.38 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
# -*- mode: sh; coding: utf-8; indent-tabs-mode: nil -*-
#
## Locale
#
export LANG=ja_JP.UTF-8
export LC_ALL=ja_JP.UTF-8
#
## Paths
#
unsetopt GLOBAL_RCS
# XDG Base Directory
if [[ -z ${XDG_CONFIG_HOME} ]]; then
export XDG_CONFIG_HOME=${HOME}/.config
fi
if [[ -z ${XDG_DATA_HOME} ]]; then
export XDG_DATA_HOME=${HOME}/.local/share
fi
if [[ -z ${XDG_CACHE_HOME} ]]; then
export XDG_CACHE_HOME=${HOME}/.cache
fi
if [[ -z ${XDG_RUNTIME_DIR} ]]; then
export XDG_RUNTIME_DIR=/private/tmp
fi
# Homebrew
brew_prefix_path=/opt/homebrew
if [[ ! -e ${brew_prefix_path} ]]; then
brew_prefix_path=/usr/local
fi
# zplug
export ZPLUG_HOME=${HOME}/opt/zplug
# composer
export COMPOSER_HOME=${HOME}/opt/composer
# nodebrew
export NODEBREW_ROOT=${HOME}/opt/nodebrew
# Python
export PYTHONPATH=$XDG_DATA_HOME/python/venv/lib/python3.12/site-packages
# PATH
typeset -T SUDO_PATH sudo_path
typeset -T INFOPATH infopath
typeset -gxU path fpath manpath sudo_path infopath
sudo_path=(${brew_prefix_path}/sbin(N-/)
{/usr/local,/usr,}/sbin(N-/))
path=(${HOME}/bin(N-/)
${brew_prefix_path}/bin(N-/)
${brew_prefix_path}/opt/{apr,apr-util,icu4c,libxml2,openjdk,openssl@1.1,python,sqlite,texinfo,unzip}/bin(N-/)
${brew_prefix_path}/share/git-core/contrib/diff-highlight(N-/)
/opt/X11/bin(N-/)
/Library/TeX/texbin(N-/)
${COMPOSER_HOME}/vendor/bin(N-/)
${NODEBREW_ROOT}/{,current/bin}(N-/)
{/usr/local,/usr,}/bin(N-/)
${sudo_path}
${path})
fpath=(${brew_prefix_path}/share/zsh/functions(N-/)
${HOME}/opt/nodebrew/completions/zsh(N-/)
${fpath})
manpath=(/usr/share/man
${brew_prefix_path}/share/man(N-/)
${brew_prefix_path}/opt/gnu-tar/libexec/gnuman(N-/)
${brew_prefix_path}/opt/gnu-sed/libexec/gnuman(N-/)
/Applications/Xcode.app/Contents/Developer/usr/share/man(N-/)
/opt/X11/share/man(N-/)
${NODEBREW_ROOT}/current/share/man(N-/)
${ZPLUG_HOME}/doc/man(N-/)
${manpath})
infopath=(${brew_prefix_path}/share/info{/emacs,}(N-/)
/usr/share/info)
#
## Apps
#
# Homebrew
export HOMEBREW_MAKE_JOBS=4
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
if [[ `which brew` ]]; then
export PKG_CONFIG_PATH=${brew_prefix_path}/opt/icu4c/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH=${brew_prefix_path}/opt/libffi/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH=${brew_prefix_path}/opt/libxml2/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH=${brew_prefix_path}/opt/openssl@1.1/lib/pkgconfig:${PKG_CONFIG_PATH}
export PKG_CONFIG_PATH=${brew_prefix_path}/opt/sqlite/lib/pkgconfig:${PKG_CONFIG_PATH}
export OPENSSL_PREFIX=$(brew --prefix openssl@1.1)
export OPENSSL_CFLAGS="-I${OPENSSL_PREFIX}/include"
export OPENSSL_LIBS="-L${OPENSSL_PREFIX}/lib -lcrypto -lssl"
export LDFLAGS="-L${brew_prefix_path}/opt/icu4c/lib"
export CPPFLAGS="-I${brew_prefix_path}/opt/icu4c/include"
fi
# Java
if [[ -x /usr/libexec/java_home ]]; then
export JAVA_HOME=`/usr/libexec/java_home`
fi
# Node.js
if [[ -d ${NODEBREW_ROOT} ]]; then
export NODE_PATH=${NODEBREW_ROOT}/current/lib/node_modules
fi
export NPM_CONFIG_USERCONFIG=${XDG_CONFIG_HOME}/npm/config
export ELECTRON_CACHE=${HOME}/Library/Caches/electron/
# GnuPG
export GNUPGHOME=${XDG_CONFIG_HOME}/gnupg
# Hunspell
export DICTIONARY=en_US
export DICPATH=${HOME}/Library/Spelling/