From e5792a2f9086c8a12ecabd6d6e6730941ed306b6 Mon Sep 17 00:00:00 2001 From: Thomas Levine <_@thomaslevine.com> Date: Mon, 29 Feb 2016 02:32:58 +0000 Subject: [PATCH] debugging zsh errors --- urchin | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/urchin b/urchin index af9daa4..d6ddb37 100755 --- a/urchin +++ b/urchin @@ -9,7 +9,14 @@ set -e -DEFAULT_SHELLS='sh bash dash mksh' # zsh' +DEFAULT_SHELLS='sh bash dash mksh zsh' +if [ -n "$ZSH_VERSION" ]; then + # avoid "no matches found: *" error when directories are empty + setopt NULL_GLOB + + emulate sh +fi + # Make sure that CDPATH isn't set, as it causes `cd` to behave unpredictably - # notably, it can produce output. @@ -104,11 +111,6 @@ recurse() { cd -- "$potential_test" > /dev/null if test -f setup_dir; then . ./setup_dir; fi - if [ -n "$ZSH_VERSION" ]; then - # avoid "no matches found: *" error when directories are empty - setopt NULL_GLOB - fi - for test in *; do if test "$test" = '*' && ! test -e $test; then # The directory is empty.