mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-04-23 16:58:28 +02:00
fix zsh compatibility (fixes #896)
This commit is contained in:
@@ -143,7 +143,7 @@ jsonsh() {
|
|||||||
|
|
||||||
# Force zsh to expand $A into multiple words
|
# Force zsh to expand $A into multiple words
|
||||||
local is_wordsplit_disabled
|
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
|
if [ "${is_wordsplit_disabled}" != "0" ]; then setopt shwordsplit; fi
|
||||||
$GREP "$STRING|$NUMBER|$KEYWORD|$SPACE|." | grep -Ev "^$SPACE$"
|
$GREP "$STRING|$NUMBER|$KEYWORD|$SPACE|." | grep -Ev "^$SPACE$"
|
||||||
if [ "${is_wordsplit_disabled}" != "0" ]; then unsetopt shwordsplit; fi
|
if [ "${is_wordsplit_disabled}" != "0" ]; then unsetopt shwordsplit; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user