From ac356c8cf6af51f276483ae8bb8c9c4954183eb9 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Thu, 18 Jan 2024 19:13:22 -0600 Subject: [PATCH] Adjust instruction for setting custom $ZDOTDIR Adjust instruction for setting custom `$ZDOTDIR`. This addresses 2 potential issues: - Check for the presence of `$XDG_CONFIG_HOME/zsh` before assigning it to `$ZDOTDIR` instead of blindly assigning - Avoid recursion in zsh variable assignment stack that might occasionally result in messages like: ``` zsh: job table full or recursion limit exceeded ``` --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b2efb1..ead6af6 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ version is **4.3.11**. ```sh export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}" - export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}" + [[ -d $XDG_CONFIG_HOME/zsh ]] && export ZDOTDIR="$XDG_CONFIG_HOME/zsh" source "$ZDOTDIR/.zshenv" ```