-
Notifications
You must be signed in to change notification settings - Fork 3
/
init.zsh
50 lines (46 loc) · 1.15 KB
/
init.zsh
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
_cwd=$(pwd)
cd ~/src/devenv/shell-config
function tsource {
[ -e "$1" ] || {
return 1
}
if true; then
source "$1"
else
local __date=/opt/homebrew/opt/coreutils/libexec/gnubin/date
local __start_ns=$($__date +%s%N)
source "$1"
local __end_ns=$($__date +%s%N)
local __delta_ns=$((__end_ns - __start_ns))
local __delta_ms=${__delta_ns:0:-6}
if ((__delta_ms > 999)); then
__delta_ms=${__delta_ms::-3},${__delta_ms: -3}
fi
echo "$1: ${__delta_ms} ms"
fi
}
setopt interactivecomments
setopt rmstarsilent
setopt AUTO_CD
autoload -U colors && colors
tsource lib.sh
tsource lib_fzf.sh
tsource lib_git.sh
tsource zsh/lib.zsh
tsource zsh/history.zsh
tsource ./3p/git-prompt.sh
tsource path-macos.sh
tsource completion.sh
tsource zsh/prompt.zsh
tsource zsh/bindings.zsh
tsource alias.sh
source zsh/syntax-highlighting.zsh # tsource breaks syntax highlighting; don't know why
tsource env.sh
tsource secret.sh
tsource ~/src/wormhole/cli/lib.sh
tsource /tmp/wormhole.env
tsource zsh/env.zsh
tsource zsh/atuin.zsh
tsource ../temporal/temporal.sh
cd "$_cwd"
unset _cwd