chiark / gitweb /
Makefile: Zap Zsh's secret `~/.zcompdump' file if `.zshrc' is newer.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 8 Dec 2018 13:09:17 +0000 (13:09 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 8 Dec 2018 13:12:13 +0000 (13:12 +0000)
Otherwise it can resurrect dead keybindings and other confusing
badness.  It does make a significant difference to Zsh startup speed,
but Zsh will recreate it automatically so it's all good.

Makefile

index 17c536a1b593bdf68582cdf3c4038e6569ea2f05..79be3ea6f02d28e083c42de5294843273857a0e7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -162,6 +162,11 @@ DOTLINKS           += .bashrc .inputrc
 .bash_logout_SRC        = shell-logout
 .zlogout_SRC            = shell-logout
 
+all::
+       $(V_AT)if [ $(HOME)/.zcompdump -ot dot/zshrc ]; then \
+         $(call v_print,ZAP,$(HOME)/.zcompdump)rm -f $(HOME)/.zcompdump; \
+       fi
+
 ## The Plan 9 `rc' shell.  This needs special hacking, because the Linux port
 ## and Plan 9 From User Space have incompatible syntax.
 DOTLINKS               += lib/profile