From 51c55ad17e23db89e72424add0c34fa20654cd8f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 6 May 2012 11:08:34 +0100 Subject: [PATCH 1/2] Suppress "zsh: no matches found" error when $ZSH_CUSTOM has no files The addition of `(.N)` enables the `NULL_GLOB` option which suppresses the error output in question. Reference: http://www.zsh.org/mla/users/2004/msg00621.html --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 732a403b7..e360344b0 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -51,7 +51,7 @@ for plugin ($plugins); do done # Load all of your custom configurations from custom/ -for config_file ($ZSH_CUSTOM/*.zsh) source $config_file +for config_file ($ZSH_CUSTOM/*.zsh(.N)) source $config_file # Load the theme if [ "$ZSH_THEME" = "random" ] From f9018c5efbb6cf164139009eff1863837d72b412 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 6 May 2012 11:10:16 +0100 Subject: [PATCH 2/2] Load themes from `$ZSH_CUSTOM` instead of `$ZSH/custom` This seems like a simple oversight, everything else uses `$ZSH_CUSTOM` rather than `$ZSH/custom`. --- oh-my-zsh.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index e360344b0..c2b6049cb 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -65,12 +65,11 @@ then else if [ ! "$ZSH_THEME" = "" ] then - if [ -f "$ZSH/custom/$ZSH_THEME.zsh-theme" ] + if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ] then - source "$ZSH/custom/$ZSH_THEME.zsh-theme" + source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" else source "$ZSH/themes/$ZSH_THEME.zsh-theme" fi fi fi -