diff options
| author | Marc Cornellà <marc@mcornella.com> | 2024-07-13 18:22:06 +0200 |
|---|---|---|
| committer | Marc Cornellà <marc@mcornella.com> | 2024-07-13 18:22:06 +0200 |
| commit | 11ca9e2ac7c70b4682e6b7d1e50a1a1cb7c1a5d9 (patch) | |
| tree | 8f83b4077b32758e51f778cc1eba0692ea9d67e6 /oh-my-zsh.sh | |
| parent | fa583cfb87b80e3f7d7577c8b62b7d1385c01337 (diff) | |
| download | zsh-11ca9e2ac7c70b4682e6b7d1e50a1a1cb7c1a5d9.tar.gz zsh-11ca9e2ac7c70b4682e6b7d1e50a1a1cb7c1a5d9.tar.bz2 zsh-11ca9e2ac7c70b4682e6b7d1e50a1a1cb7c1a5d9.zip | |
fix(init): add cached completions directory only once (#12551)
Double quotes within the subscript test are interpreted literally, making the
test never match. On subsequent runs, the `$ZSH_CACHE_DIR/completions` directory
is always prepended to `$fpath`, even if it is already there. This commit fixes
that.
Fixes #12551
Co-authored-by: Adem Simsek <adem@simsek.dev>
Diffstat (limited to 'oh-my-zsh.sh')
| -rw-r--r-- | oh-my-zsh.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 694095afa..906d19a45 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -65,7 +65,7 @@ fi # Create cache and completions dir and add to $fpath mkdir -p "$ZSH_CACHE_DIR/completions" -(( ${fpath[(Ie)"$ZSH_CACHE_DIR/completions"]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) +(( ${fpath[(ie)$ZSH_CACHE_DIR/completions]} )) || fpath=("$ZSH_CACHE_DIR/completions" $fpath) # Check for updates on initial load... source "$ZSH/tools/check_for_upgrade.sh" |
