aboutsummaryrefslogtreecommitdiff
path: root/home/zlogin
diff options
context:
space:
mode:
authorRubén Beltrán del Río <jj@r.bdr.sh>2026-03-15 21:41:58 +0100
committerRubén Beltrán del Río <jj@r.bdr.sh>2026-03-15 22:20:01 +0100
commite2582f8649e9e67f02210f659b69523c46003087 (patch)
treed7e87b1993e543bcf83345bf584ce3706b3fd1f8 /home/zlogin
parent68fc4436c2565ff31f1499d868ac71bc560121ee (diff)
Simplify installation
Diffstat (limited to 'home/zlogin')
-rw-r--r--home/zlogin18
1 files changed, 18 insertions, 0 deletions
diff --git a/home/zlogin b/home/zlogin
new file mode 100644
index 0000000..60876ac
--- /dev/null
+++ b/home/zlogin
@@ -0,0 +1,18 @@
+# Execute code that does not affect the current session in the background.
+{
+ # Compile the completion dump to increase startup speed.
+ zcompdump="${ZDOTDIR:-$HOME}/.zcompdump"
+ if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then
+ zcompile "$zcompdump"
+ fi
+} &!
+
+# Print a random, hopefully interesting, adage.
+if (( $+commands[fortune] )); then
+ echo -en "\033[30m"
+ if [[ -t 0 || -t 1 ]]; then
+ fortune -s
+ print
+ fi
+ echo -en "\033[m"
+fi