From b3695c8471ad21649c471c1e2c9dd2ee4481a062 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Tue, 21 Nov 2023 16:41:27 +1100 Subject: [PATCH] Simplify source globbing, now files all end in .zsh --- dot-config/zsh/zlogout | 2 +- dot-config/zsh/zprofile | 2 +- dot-config/zsh/zshenv | 7 ++----- dot-config/zsh/zshrc | 5 +++-- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dot-config/zsh/zlogout b/dot-config/zsh/zlogout index a5001da..d32fc72 100644 --- a/dot-config/zsh/zlogout +++ b/dot-config/zsh/zlogout @@ -1,2 +1,2 @@ #! zsh -for f in $ZDOTDIR/logout/^*.zwc(N); source $f +for f in $ZDOTDIR/logout/*.zsh(N); source $f diff --git a/dot-config/zsh/zprofile b/dot-config/zsh/zprofile index eb95e94..73a2f28 100644 --- a/dot-config/zsh/zprofile +++ b/dot-config/zsh/zprofile @@ -1,2 +1,2 @@ #! zsh -for f in $ZDOTDIR/login/^*.zwc(N); source $f +for f in $ZDOTDIR/login/*.zsh(N); source $f diff --git a/dot-config/zsh/zshenv b/dot-config/zsh/zshenv index 52db592..bc59fbf 100644 --- a/dot-config/zsh/zshenv +++ b/dot-config/zsh/zshenv @@ -1,5 +1,2 @@ -setopt extended_glob -for f in $ZDOTDIR/all/^*.zwc(N); do - [[ ! -f $f.zwc ]] && zcompile $f - source $f -done +#! zsh +for f in $ZDOTDIR/all/*.zsh(N); source $f diff --git a/dot-config/zsh/zshrc b/dot-config/zsh/zshrc index a829dfa..888d92d 100644 --- a/dot-config/zsh/zshrc +++ b/dot-config/zsh/zshrc @@ -1,3 +1,4 @@ +#! zsh # For accurate instant prompt from Powerlevel10k, we need to load up the # correct environment from direnv first. (( ${+commands[direnv]} )) && emulate zsh -c "$(direnv export zsh)" @@ -21,9 +22,9 @@ dot-zsh-compinit() { } source $ZDOTDIR/plugins.zsh -for f in $ZDOTDIR/interactive/^*.zwc(N); source $f +for f in $ZDOTDIR/interactive/*.zsh(N); source $f -[[ -o login ]] && for f in $ZDOTDIR/interactive+login/^*.zwc(N); source $f +[[ -o login ]] && for f in $ZDOTDIR/interactive+login/*.zsh(N); source $f export POWERLEVEL9K_CONFIG_FILE=${ZDOTDIR}/p10k.zsh # To customize prompt, run `p10k configure` or edit ~/.config/zsh/p10k.zsh