Skip to content

Commit 621e570

Browse files
committed
Asynchronous completion compilation
Signed-off-by: Timo Sand <[email protected]>
1 parent b816ba5 commit 621e570

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

zlogin

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,27 @@
1+
#!/usr/bin/env zsh
2+
# vim:syntax=zsh
3+
# vim:filetype=zsh
14
#echo 'zlogin' $0 # Debug
5+
6+
# Execute code in the background to not affect the current session
7+
(
8+
# <https://github.com/zimfw/zimfw/blob/master/login_init.zsh>
9+
setopt LOCAL_OPTIONS EXTENDED_GLOB
10+
autoload -U zrecompile
11+
local ZSHCONFIG=~/.zsh
12+
13+
# Compile zcompdump, if modified, to increase startup speed.
14+
zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
15+
if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
16+
zrecompile -pq "$zcompdump"
17+
fi
18+
# zcompile .zshrc
19+
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc
20+
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zprofile
21+
zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshenv
22+
# recompile all zsh or sh
23+
for f in $ZSHCONFIG/**/*.*sh
24+
do
25+
zrecompile -pq $f
26+
done
27+
) &!

0 commit comments

Comments
 (0)