Repository navigation
Expand file tree
/
Copy pathzshenv
More file actions
114 lines (94 loc) · 1.76 KB
/
Copy pathzshenv
File metadata and controls
114 lines (94 loc) · 1.76 KB
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
# このファイル読み込み前に設定しておくべきこと
# LANGの変数
# PATH系変数設定
typeset -T NODE_PATH node_path
typeset -Tx XDG_CONFIG_DIRS xdg_config_dirs
typeset -U path fpath manpath node_path xdg_config_dirs
dotfiles="$HOME/dotfiles"
path=(
$HOME/bin(N-/)
$HOME/local/bin(N-/)
$path
$ECLIPSE_HOME(N-/)
)
#nix single user
nix_sh="~/.nix-profile/etc/profile.d/nix.sh"
if [ -f $nix_sh ]; then
source $nix_sh
fi
if which go >/dev/null 2>&1; then
path=($(go env GOPATH)/bin $path)
fi
if which ruby >/dev/null 2>&1; then
path=(
$(ruby -e 'print Gem.user_dir')/bin(N-/)
$path
)
fi
if which python3 >/dev/null 2>&1; then
path=(
$(python3 -m site --user-base)/bin(N-/)
$path
)
fi
if which python2 >/dev/null 2>&1; then
path=(
$(python2 -m site --user-base)/bin(N-/)
$path
)
fi
fpath=(
$dotfiles/zsh-completions/src(N-/)
/usr/local/share/zsh/site-functions(N-/)
$fpath
)
manpath=(
$manpath
)
xdg_config_dirs=(
$dotfiles/config
$xdg_config_dirs
)
# LANGが特に指定されてなければ
if [ -z "$LANG" ] ; then
LANG="ja_JP.UTF-8"
fi
#TERMがLinuxだったらLANGをCに
case "$TERM" in
"linux" ) LANG=C ;;
* )
;;
esac
#ttyがconsoleかttyv[0-9]だったらCに
case `tty` in
/dev/console|/dev/ttyv[0-9])
LANG=C
;;
* )
;;
esac
export LANG
# エディタ
if [[ -z "$EDITOR" ]] && which vim>/dev/null ; then
EDITOR=vim
fi
export EDITOR
# chrome のオプション
typeset -xU google_chrome_option
google_chrome_option=(
# ローカルファイルへのアクセスを許可
"--allow-file-access-from-files"
# Same origin policyを無効に
"--disable-web-security"
)
case "${OSTYPE}" in
# Mac用
darwin*)
if [ -e "$dotfiles/zsh/darwin.zsh" ] ; then
source ~/dotfiles/zsh/darwin.zsh
fi
;;
# Linux用
linux*)
;;
esac