about summary refs log tree commit diff
path: root/zsh/.zlogin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--zsh/.zlogin28
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
+) &!

Consider giving Nix/NixOS a try! <3