dot/zshrc: Automatically rehash command completions on a cache miss.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 22 Apr 2020 19:17:56 +0000 (20:17 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 22 Apr 2020 19:17:56 +0000 (20:17 +0100)
Solution found at https://bbs.archlinux.org/viewtopic.php?id=175388.

dot/zshrc

index 62766c0..32ed72e 100644 (file)
--- a/dot/zshrc
+++ b/dot/zshrc
@@ -80,6 +80,7 @@ do
   zstyle ':zle:*-bash' word-chars ""
   zstyle ':zle:*-shell' word-style shell
   zstyle ':zle:*-shell' skip-whitespace-first false
+  zstyle ':completion:*' rehash true
 done
 
 bindkey "\eb" backward-word-bash