From ff987384cf721e7e0812636dea8100b485968bb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 5 May 2020 12:13:45 +0200 Subject: [PATCH] core: fix cmp invocation in BSD systems BSD cmp doesn't have the option of reading from stdin, so use process substitution instead. --- 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 092099325..285caf668 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -68,7 +68,7 @@ zcompdump_metadata="\ " # Delete the zcompdump file if OMZ zcompdump metadata changed -if ! cmp -s <(command grep '^#omz' "$ZSH_COMPDUMP" 2>/dev/null) <<< "$zcompdump_metadata"; then +if ! cmp -s <(command grep '^#omz' "$ZSH_COMPDUMP" 2>/dev/null) <(echo "$zcompdump_metadata"); then command rm -f "$ZSH_COMPDUMP" zcompdump_refresh=1 fi