From 72123a3aa335c15e9349f60d202273f3d38f8ca9 Mon Sep 17 00:00:00 2001 Message-Id: <72123a3aa335c15e9349f60d202273f3d38f8ca9.1716681509.git.mdw@distorted.org.uk> From: Mark Wooding Date: Sat, 8 Dec 2018 13:09:17 +0000 Subject: [PATCH] Makefile: Zap Zsh's secret `~/.zcompdump' file if `.zshrc' is newer. Organization: Straylight/Edgeware From: Mark Wooding 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 17c536a..79be3ea 100644 --- 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 -- [mdw]