From 3dc13483c1e08d1006f2d1f89e9d02eac13b7995 Mon Sep 17 00:00:00 2001 From: Sumathi Dhanasekaran Date: Thu, 13 Mar 2025 13:28:59 +0000 Subject: [PATCH] Update README.md - Zsh rebuilding the completion cache twice Zsh rebuilding the completion cache twice --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 14c81b2..3c66ef6 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,14 @@ Add `zinit light zsh-users/zsh-completions` to your `~/.zshrc`. rm -f ~/.zcompdump; compinit +Second Solution: +zsh-completions as a plugin, they suggest manually adding its source directory to fpath before sourcing oh-my-zsh.sh. +This ensures Zsh loads the completion files only once, improving performance. +Recommended Fix: +Instead of the existing method, they propose adding this line: + +fpath=($ZSH/custom/plugins/zsh-completions/src $fpath) + ### Contributing Contributions are welcome, see [CONTRIBUTING](https://github.com/zsh-users/zsh-completions/blob/master/CONTRIBUTING.md).