-
Notifications
You must be signed in to change notification settings - Fork 16
/
zlogin
26 lines (24 loc) · 822 Bytes
/
zlogin
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
#!/usr/bin/env zsh
# vim:syntax=zsh
# vim:filetype=zsh
# Execute code in the background to not affect the current session
(
# <https://github.com/zimfw/zimfw/blob/master/login_init.zsh>
setopt LOCAL_OPTIONS EXTENDED_GLOB
autoload -U zrecompile
local ZSHCONFIG=~/.zsh-config
# Compile zcompdump, if modified, to increase startup speed.
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
zrecompile -pq "$zcompdump"
fi
# zcompile .zshrc
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zprofile
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshenv
# recompile all zsh or sh
for f in $ZSHCONFIG/**/*.*sh
do
zrecompile -pq $f
done
) &!