You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: FAQ.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ _If you don't find what you're looking for, and you think it should be covered b
33
33
-[Completion issues](#completion-issues)
34
34
-[I have enabled a completion plugin but the completion doesn't work](#i-have-enabled-a-completion-plugin-but-the-completion-doesnt-work)
35
35
-[I see duplicate typed characters after I complete a command](#i-see-duplicate-typed-characters-after-i-complete-a-command)
36
+
-[Completions are not loaded when using a plugin manager](#completions-are-not-loaded-when-using-a-plugin-manager)
36
37
-[Zsh errors](#zsh-errors)
37
38
-[zsh: no matches found](#zsh-no-matches-found)
38
39
-[Some commands no longer work after installing Oh My Zsh](#some-commands-no-longer-work-after-installing-oh-my-zsh)
@@ -349,6 +350,34 @@ This usually happens because your theme uses UTF-8 characters but your `locale`
349
350
350
351
Similar issues: [#6985](https://github.com/ohmyzsh/ohmyzsh/issues/6985#issuecomment-412055789), [#3932](https://github.com/ohmyzsh/ohmyzsh/pull/3932), [#4529](https://github.com/ohmyzsh/ohmyzsh/issues/4529), [#4632](https://github.com/ohmyzsh/ohmyzsh/issues/4632).
351
352
353
+
#### Completions are not loaded when using a plugin manager
354
+
355
+
Some of the plugins in Oh My Zsh generate completion files dynamically, and puts them in the cache directory under `$ZSH_CACHE_DIR/completions`.
356
+
357
+
Oh My Zsh already sets this up for you, as part of the [init script](https://github.com/ohmyzsh/ohmyzsh/blob/master/oh-my-zsh.sh). However, plugin
358
+
managers don't run this script automatically as they do some internal optimizations.
359
+
360
+
To check that you are affected by this, try:
361
+
362
+
```zsh
363
+
echo$ZSH_CACHE_DIR
364
+
```
365
+
366
+
It should return something like `/path/to/oh-my-zsh-folder/cache` or `$HOME/.cache/oh-my-zsh`.
367
+
If not, add `ZSH_CACHE_DIR="$HOME/.cache/oh-my-zsh"` in your .zshrc file, before the plugin manager code.
368
+
369
+
Then, also check that the directories exist:
370
+
371
+
```zsh
372
+
ls -l "$ZSH_CACHE_DIR"
373
+
ls -l "$ZSH_CACHE_DIR/completions"
374
+
```
375
+
376
+
If they don't exist, run `mkdir -p $ZSH_CACHE_DIR/completions` once, or add it in the zshrc file after defining `ZSH_CACHE_DIR`.
377
+
378
+
> [!NOTE]
379
+
> This is a workaround when using plugin managers. Ideally we want to make this so that it works out of the box with any plugin manager you use. If you encounter an issue related to this, please +1 Feature Request [#12583](https://github.com/ohmyzsh/ohmyzsh/issues/12583) and add a comment with the plugin manager affected if not already in the list.
0 commit comments