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
View File

@ -146,11 +146,19 @@
unset fzf_bindings
# ZVM_INSERT_MODE_CURSOR=$ZVM_CURSOR_BLINKING_BLOCK
# User configuration
source ~/.dotenv
source ${XDG_RUNTIME_DIR}/secrets/envs
source ~/.zsh/aliases.zsh
source ~/.zsh/functions.zsh
local __tosrc=(
~/.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
# You may need to manually set your language environment
LANG=en_GB.UTF-8