Skip to content

Update README.md - Zsh rebuilding the completion cache twice #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SumathiD20
Copy link

Zsh rebuilding the completion cache twice

  • This compdef is not already available in zsh.
  • This compdef is not already available in their original project.
  • I am the original author, or I have authorization to submit this work.
  • This is a finished work.
  • It has a header containing authors, status and origin of the script.
  • It has a license header or I accept that it will be licensed under the terms of the Zsh license.

Zsh rebuilding the completion cache twice
Copy link

@ferdnyc ferdnyc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The addition is redundant, it offers a different wording of the same instructions that are already in the document.

Comment on lines +64 to +71
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)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This information is already there. The advice for Oh-my-Zsh! was updated years ago in response to #603.

What you're proposing is exactly the same as:

  • Add it to FPATH in your .zshrc by adding the following line before source "$ZSH/oh-my-zsh.sh":

      fpath+=${ZSH_CUSTOM:-${ZSH:-~/.oh-my-zsh}/custom}/plugins/zsh-completions/src
    

...Which is exactly what the instructions already say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants