-
Notifications
You must be signed in to change notification settings - Fork 16
/
zshrc
55 lines (44 loc) · 1.05 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/env zsh
# vim:syntax=zsh
# vim:filetype=zsh
# for profiling zsh
# https://unix.stackexchange.com/a/329719/27109
#
#zmodload zsh/zprof
export SCRIPTS=${HOME}/scripts
export ZSHCONFIG=${ZDOTDIR:-$HOME}/.zsh-config
ZSH_INIT=${ZSHCONFIG}/_init.sh
if [[ -s ${ZSH_INIT} ]]; then
source ${ZSH_INIT}
else
echo "Could not find the init script ${ZSH_INIT}"
fi
#
# https://gist.github.com/ctechols/ca1035271ad134841284
# https://carlosbecker.com/posts/speeding-up-zsh
#
autoload -Uz compinit
case $SYSTEM in
Darwin)
if [ $(date +'%j') != $(/usr/bin/stat -f '%Sm' -t '%j' ${ZDOTDIR:-$HOME}/.zcompdump) ]; then
compinit;
else
compinit -C;
fi
;;
Linux)
# not yet match GNU & BSD stat
;;
esac
# see zplugin-init.zsh with Turbo Mode
#[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# https://direnv.net/
# see zplugin-init.zsh
# https://github.com/zdharma/zplugin/wiki/Direnv-explanation
#eval "$(direnv hook zsh)"
# Private script here
if [ -d ~/.private ]; then
for f in ~/.private/*sh; do
source "$f"
done
fi