-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshenv
50 lines (39 loc) · 1 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
#!/bin/zsh
setopt no_global_rcs
umask 022
ulimit -c unlimited
export XDG_CONFIG_HOME=$HOME/.config
[[ -d $XDG_CONFIG_HOME ]] || mkdir --parents $XDG_CONFIG_HOME
if [[ -d $HOME/Library/Caches ]]; then
export XDG_CACHE_HOME=$HOME/Library/Caches
else
export XDG_CACHE_HOME=$HOME/.cache
[[ -d $XDG_CACHE_HOME ]] || mkdir --parents $XDG_CACHE_HOME
fi
export XDG_DATA_HOME=$HOME/.local/share
[[ -d $XDG_DATA_HOME ]] || mkdir --parents $XDG_DATA_HOME
ZDOTDIR=$XDG_CONFIG_HOME/zsh
typeset -aU path
() {
local winpath=( ${(M)path##/mnt*} )
set -A path ${^${~${(@fe)"$(<$ZDOTDIR/paths)"}}}(N)
path=($path $winpath)
}
fpath=(
$ZDOTDIR/functions $ZDOTDIR/hooks $fpath
/opt/homebrew/share/zsh/site-functions
/opt/homebrew/share/zsh-completions
)
autoload -Uz ${(e)${^$(echo $ZDOTDIR/{functions,hooks}/*(@,.N))}:t}
# mise
is-executable mise && {
case "$-" in
*i*)
eval "$(mise activate)"
;;
*)
eval "$(mise activate --shims)"
;;
esac
}
export SQLITE_HISTORY=$XDG_DATA_HOME/sqlite_history