From 1059f8eb9f9393d4f10f88a7b17febb66c989753 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sun, 2 Feb 2020 16:02:36 +0100 Subject: [PATCH] Fix initialization routine Will now source all necessary .d/ directories, also from zsh. --- zsh/.config/zsh/.zprofile | 7 +++++++ zsh/.config/zsh/.zshrc | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/zsh/.config/zsh/.zprofile b/zsh/.config/zsh/.zprofile index d5d413a..a6c3cb5 100644 --- a/zsh/.config/zsh/.zprofile +++ b/zsh/.config/zsh/.zprofile @@ -10,3 +10,10 @@ if [ -d "$XDG_CONFIG_HOME/sh/profile.d" ]; then done unset file fi +if [ -d "$XDG_CONFIG_HOME/zsh/profile.d" ]; then + for file in "$XDG_CONFIG_HOME/zsh/profile.d"/*.sh; do + # shellcheck disable=1090 + source "$file" + done + unset file +fi diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 3e028bc..4c78b84 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -36,6 +36,12 @@ if [ -d "$CONFDIR/sh/alias.d" ]; then done unset _alias fi +if [ -d "$ZSHCONFDIR/alias.d" ]; then + for _alias in "$ZSHCONFDIR/alias.d"/*.sh; do + . "$_alias" + done + unset _alias +fi # Correct spelling for commands setopt correct