zshrc: break out sourcing code

This commit is contained in:
surtur 2023-09-08 14:25:30 +02:00
parent cd8c93a206
commit 68c26a9ac1
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI
2 changed files with 17 additions and 16 deletions

16
.zsh/sources.zsh Normal file

@ -0,0 +1,16 @@
local __tosrc=(
~/.zsh/bindings.zsh
~/.zsh/fzf.zsh
~/.zsh/zvm.zsh
~/.dotenv
${XDG_RUNTIME_DIR}/secrets/envs
~/.zsh/aliases.zsh
~/.zsh/functions.zsh
)
for s in $__tosrc[@]; do
test -f $s && source $s
done
unset __tosrc

17
.zshrc

@ -37,22 +37,7 @@
ZSH_THEME_GIT_PROMPT_CACHE=" "
local __tosrc=(
~/.zsh/bindings.zsh
~/.zsh/fzf.zsh
~/.zsh/zvm.zsh
~/.dotenv
${XDG_RUNTIME_DIR}/secrets/envs
~/.zsh/aliases.zsh
~/.zsh/functions.zsh
)
for s in $__tosrc[@]; do
test -f $s && source $s
done
unset __tosrc
test -f ~/.zsh/sources.zsh && source ~/.zsh/sources.zsh
# You may need to manually set your language environment
LANG=en_GB.UTF-8