From 956d3ed0dc50cc3b9f0f0266ac477669f05d28d7 Mon Sep 17 00:00:00 2001 From: Joel Mathew Thomas <90510078+joelmathewthomas@users.noreply.github.com> Date: Fri, 27 Dec 2024 22:23:30 +0530 Subject: [PATCH] add script to source extra zsh configs --- .zshrc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.zshrc b/.zshrc index 32a7827..5d78509 100644 --- a/.zshrc +++ b/.zshrc @@ -81,3 +81,13 @@ export MAKEFLAGS="-j$(( $(nproc) + 1 )) -l$(nproc)" # Shell integrations eval "$(fzf --zsh)" eval "$(zoxide init --cmd cd zsh)" + +# Source all configuration files from ~/.zshrc.d +ZSHRC_D_DIR="$HOME/.zshrc.d" + +if [ -d "$ZSHRC_D_DIR" ]; then + for config in "$ZSHRC_D_DIR"/*; do + [ -r "$config" ] && source "$config" + done +fi +