-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
31 lines (28 loc) · 964 Bytes
/
.zshrc
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
# function source {
# ensure_zcompiled $1
# builtin source $1
# }
# function ensure_zcompiled {
# local compiled="$1.zwc"
# if [[ ! -r "$compiled" || "$1" -nt "$compiled" ]]; then
# echo "\033[1;36mCompiling\033[m $1"
# zcompile $1
# fi
# }
# ensure_zcompiled ~/.zshrc
# # ref: https://zenn.dev/fuzmare/articles/zsh-plugin-manager-cache
# cache_dir=${XDG_CACHE_HOME:-$HOME/.cache}
# sheldon_cache="${cache_dir}/sheldon.zsh"
# sheldon_toml="${XDG_CONFIG_HOME:-$HOME/.config}sheldon/plugins.toml"
# # キャッシュがない、またはキャッシュが古い場合にキャッシュを作成
# if [[ ! -r "$sheldon_cache" || "$sheldon_toml" -nt "$sheldon_cache" ]]; then
# mkdir -p $cache_dir
# sheldon source > $sheldon_cache
# fi
# source "$sheldon_cache"
# unset cache_dir sheldon_cache sheldon_toml
# zsh-defer unfunction source
if [ "$(uname -m)" = "arm64" ]; then
export PATH="/opt/homebrew/bin:$PATH"
fi
eval "$(sheldon source)"