-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshenv
175 lines (127 loc) · 4.06 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#-- Prelude {{{ --------------------------------------------------------------
if [[ "${ZSH_PROFILE:+x}" = x ]]; then
zmodload zsh/zprof
fi
export ZSHHOME=$HOME/.zsh
has() {
(( $+commands[$1] ))
}
#-- Prelude }}}---------------------------------------------------------------
#-- User settings {{{ --------------------------------------------------------
export NAME=uasi
export REALNAME="Tomoki Aonuma"
export EMAIL="[email protected]"
export EDITOR=vim
export LANG=en_US.utf-8
# Explicitly set the XDG_* variables to their default values in the hope of
# overriding preference of certain softwares (e.g. pnpm) that would otherwise
# use macOS paths such as ~/Library.
export XDG_CACHE_HOME=$HOME/.cache
export XDG_CONFIG_HOME=$HOME/.config
export XDG_DATA_HOME=$HOME/.local/share
export XDG_STATE_HOME=$HOME/.local/state
#-- User settings }}} --------------------------------------------------------
#-- Zsh settings {{{ ---------------------------------------------------------
# Command history settings
export HISTFILE=$HOME/.zsh-history
export HISTSIZE=100000
export SAVEHIST=100000
#-- Zsh settings }}} ---------------------------------------------------------
#-- Application settings {{{ -------------------------------------------------
# .NET
export DOTNET_CLI_UI_LANGUAGE=en-US
# Deno
export DENO_DIR=$HOME/.local/share/deno
export DENO_INSTALL_ROOT=$DENO_DIR
# Docker
export DOCKER_HIDE_LEGACY_COMMANDS=true # Show only new commands in docker --help.
# Erlang/Elixir
export ERL_AFLAGS="-kernel shell_history enabled"
# Elixir
export IEX_WITH_WERL=1 # Enable autocompletion in iex shell.
# fzf
export FZF_DEFAULT_COMMAND="rg -l --hidden ''"
export FZF_DEFAULT_OPTS="--multi --extended"
# Go
export GOPATH=$HOME/.local/share/go
# Python 3.8 bug?
#
# If LC_CTYPE is unset, it dies on startup with the message below:
#
# > Fatal Python error: config_get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed
# > Python runtime state: preinitialized
#
# `nl_langinfo(CODESET)` seems to return LC_CTYPE: https://linuxjm.osdn.jp/html/LDP_man-pages/man3/nl_langinfo.3.html
#
# Related discussion: https://bugs.python.org/issue39397
export LC_CTYPE=ja_JP.UTF-8
# pnpm
export PNPM_HOME=$HOME/.local/share/pnpm/bin
# Ripgrep
export RIPGREP_CONFIG_PATH=$HOME/.config/ripgrep/config
# Ruby
export RUBYLIB=$HOME/.local/lib/ruby
# Rye
export RYE_HOME=$HOME/.local/share/rye
# uv
export UV_TOOL_BIN_DIR=$HOME/.local/share/uv/bin
### My apps
# phog
export PHOG_CONFIG_DIR=$HOME/Dropbox/Data/phog
export PHOG_DATA_DIR=$HOME/Dropbox/Data/phog
# photo_grabber
export PHOTO_GRABBER_DATA_DIR=$HOME/Dropbox/Data/photo_grabber
#-- Application settings }}} -------------------------------------------------
#-- PATHs {{{ ----------------------------------------------------------------
path=(
# Local (high priority)
$HOME/bin
# Deno
$DENO_INSTALL_ROOT/bin
# Elixir
$HOME/.mix/escripts
# Go
$HOME/.local/share/go/bin
# JetBrains Toolbox
$HOME/'Library/Application Support/JetBrains/Toolbox/scripts'
# pnpm
$HOME/.local/share/pnpm/bin
# rbenv
$HOME/.rbenv/shims
# Rancher Desktop
$HOME/.rd/bin
# Rust
$HOME/.cargo/bin
# Sublime Merge
'/Applications/Sublime Merge.app/Contents/SharedSupport/bin'
# Sublime Text
'/Applications/Sublime Text.app/Contents/SharedSupport/bin'
# uv
$HOME/.local/share/uv/bin
# Visual Studio Code
'/Applications/Visual Studio Code.app/Contents/Resources/app/bin'
# ---
# Local
$HOME/.local/bin
/usr/local/(s|)bin
$HOME/Dropbox/Data/Executables
# Homebrew
/opt/homebrew/bin
/opt/homebrew/(s|)bin
/opt/homebrew/opt/postgresql@*/bin
$path
)
path=(${(u)^path:A}(N-/))
cdpath=$HOME
fpath=(
$ZSHHOME/functions
/usr/local/share/zsh-completions
$fpath
$ZSHHOME/functions_fallback
)
fpath=(${(u)^fpath:A}(N-/))
# Save PATH in case we need to restore PATH clobbered by system-wide
# configuration scripts.
_path=$PATH
typeset -U _path
#-- PATHs }}} ----------------------------------------------------------------