From 68c26a9ac115a4068afc15957004de64c68cd541 Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 8 Sep 2023 14:25:30 +0200 Subject: [PATCH] zshrc: break out sourcing code --- .zsh/sources.zsh | 16 ++++++++++++++++ .zshrc | 17 +---------------- 2 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 .zsh/sources.zsh diff --git a/.zsh/sources.zsh b/.zsh/sources.zsh new file mode 100644 index 0000000..8d4ec09 --- /dev/null +++ b/.zsh/sources.zsh @@ -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 diff --git a/.zshrc b/.zshrc index edb788e..3303814 100644 --- a/.zshrc +++ b/.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