diff --git a/dehydrated b/dehydrated index c11d7d0f..a2bff408 100755 --- a/dehydrated +++ b/dehydrated @@ -143,7 +143,7 @@ jsonsh() { # Force zsh to expand $A into multiple words local is_wordsplit_disabled - is_wordsplit_disabled="$(unsetopt 2>/dev/null | grep -c '^shwordsplit$')" + is_wordsplit_disabled="$(unsetopt 2>/dev/null | grep -c '^shwordsplit$' || true)" if [ "${is_wordsplit_disabled}" != "0" ]; then setopt shwordsplit; fi $GREP "$STRING|$NUMBER|$KEYWORD|$SPACE|." | grep -Ev "^$SPACE$" if [ "${is_wordsplit_disabled}" != "0" ]; then unsetopt shwordsplit; fi