aurora/dx/usr/etc/zsh/zlogin
Hikari 5535205718
feat: add more zsh configs (#966)
Co-authored-by: Brian Ketelsen <bketelsen@gmail.com>
Co-authored-by: Jorge O. Castro <jorge.castro@gmail.com>
2024-03-05 19:06:33 -05:00

26 lines
No EOL
832 B
Bash

#!/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="${ZDOTDIR:-$HOME}/.zsh"
# 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
) &!