From 845e636516e002b8551ef9837b72ba38ea950bbb Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Mon, 20 Feb 2023 14:05:35 -0800 Subject: [PATCH] add support for zsh.after --- oh-my-zsh.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 98bda8c8b..759fdd0bf 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -41,6 +41,8 @@ # If ZSH is not defined, use the current script's directory. [[ -z "$ZSH" ]] && export ZSH="${${(%):-%x}:a:h}" +mkdir -p "$HOME"/.zsh.after + # Set ZSH_CACHE_DIR to the path where cache files should be created # or else we will use the default cache/ if [[ -z "$ZSH_CACHE_DIR" ]]; then @@ -189,3 +191,10 @@ if [[ -n "$ZSH_THEME" ]]; then echo "[oh-my-zsh] theme '$ZSH_THEME' not found" fi fi + +for config_file ("$HOME"/.zsh.after/*.zsh(N)); do + source "$config_file" +done + +unset config_file +