ff987384cf721e7e0812636dea8100b485968bb2
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
core: fix cmp invocation in BSD systems
BSD cmp doesn't have the option of reading from stdin, so use process
substitution instead.
Diff
1diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
2index 09209932544381621d4982d3ef973a47ee51f944..285caf6686d741b3899109dda33840d508f7bda7 100644
3--- a/oh-my-zsh.sh
4+++ b/oh-my-zsh.sh
5@@ -68,7 +68,7 @@ zcompdump_metadata="\
6 "
7
8 # Delete the zcompdump file if OMZ zcompdump metadata changed
9-if ! cmp -s <(command grep '^#omz' "$ZSH_COMPDUMP" 2>/dev/null) <<< "$zcompdump_metadata"; then
10+if ! cmp -s <(command grep '^#omz' "$ZSH_COMPDUMP" 2>/dev/null) <(echo "$zcompdump_metadata"); then
11 command rm -f "$ZSH_COMPDUMP"
12 zcompdump_refresh=1
13 fi