zshrc: source files only if they exist

This commit is contained in:
surtur 2023-08-18 17:20:23 +02:00
parent 12dddf410c
commit 7e0ea6ace1
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

18
.zshrc

@ -146,11 +146,19 @@
unset fzf_bindings unset fzf_bindings
# ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK # ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK
# User configuration
source ~/.dotenv local __tosrc=(
source ${XDG_RUNTIME_DIR}/secrets/envs ~/.dotenv
source ~/.zsh/aliases.zsh ${XDG_RUNTIME_DIR}/secrets/envs
source ~/.zsh/functions.zsh ~/.zsh/aliases.zsh
~/.zsh/functions.zsh
)
for s in $__tosrc[@]; do
test -f $s && source $s
done
unset __tosrc
# You may need to manually set your language environment # You may need to manually set your language environment
LANG=en_GB.UTF-8 LANG=en_GB.UTF-8