@ 260802.2

200820.8 · 30aeae3e781c632e577e1bbe2530c1e74c8a60ec

zsh: make compinit check platform dependent

... to account for differences in 'stat' between BSD and GNU user lands.

reading declarations

Changes to bin/is-zcompdump-outdated. All files

bin/is-zcompdump-outdated

new file mode 100755@@ -0,0 +1,23 @@+#!/usr/bin/env zsh++if ! [ -f ~/.zcompdump ]; then+  exit 0+fi+# Seemingly, work machines running Ubuntu always needs 'compinit' for this to+# work, so never do the optimization there.+if is-work; then+  exit 0+fi++# Grrr to differences in 'stat' between BSD and GNU.+if is-mac; then+  if [[ "$(date +'%j')" == "$(stat -f '%m' ~/.zcompdump | date +'%j')" ]]; then+    exit 1+  fi+  exit 0+else+  if [[ "$(date +'%j')" == "$(stat -c '%y' ~/.zcompdump | date +'%j')" ]]; then+    exit 1+  fi+  exit 0+fi