mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 14:20:30 +01:00
fix zsh compatibility (fixes #896)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user