From dc621af59d5b41e0cc95c6f1b8777deb4daaba6d Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 19 Aug 2019 14:53:40 -0700 Subject: [PATCH] Avoid error if nothing exists in zshrc.d. --- dotfiles/zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/zshrc b/dotfiles/zshrc index 320013c..828f9d9 100755 --- a/dotfiles/zshrc +++ b/dotfiles/zshrc @@ -59,7 +59,8 @@ bindkey '^r' history-incremental-search-backward # Source extras and aliases if interactive if [[ $- == *i* ]] ; then if [[ -e $HOME/.aliases ]] ; then source $HOME/.aliases ; fi - for file in $HOME/.zshrc.d/* ; do source "$file" ; done + # zsh-only-ism to avoid error if glob doesn't expand + for file in $HOME/.zshrc.d/*(N) ; do source "$file" ; done fi # In case ack is named ack-grep