diff options
author | Azat Bahawi <azat@bahawi.net> | 1970-01-01 03:00:00 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-09-20 11:51:54 +0300 |
commit | 38bab29776950ac2364ed64195b89887717c33de (patch) | |
tree | edaaf366a55dbe96d268019124536bc504c64e87 /zsh/.zlogin |
Diffstat (limited to 'zsh/.zlogin')
-rw-r--r-- | zsh/.zlogin | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/zsh/.zlogin b/zsh/.zlogin new file mode 100644 index 0000000..350d066 --- /dev/null +++ b/zsh/.zlogin @@ -0,0 +1,28 @@ +#!/usr/bin/env zsh + +( + autoload -U zrecompile + + lazy_zrecompile() + { + if [[ -s "${1}" && ( ! -s "${1}.zwc" || "${1}" -nt "${1}.zwc" ) ]] + then + zrecompile -pq "${1}" + fi + } + + FLIST=( + ${ZCOMPDUMP} + ${ZLOGIN} + ${ZLOGOUT} + ${ZPROFILE} + ${ZSHENV} + ${ZSHRC} + ${HOME}/.zsh.d/*.zsh + ) + + for i in ${FLIST} + do + lazy_zrecompile "${i}" + done +) &! |