Skip to content
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

Lazy completion loading for Zsh #475

Merged
merged 2 commits into from
Mar 4, 2024

Conversation

segevfiner
Copy link
Contributor

@segevfiner segevfiner commented Feb 26, 2024

You can simply save the completion script into a directory in the $fpath and it will work, the Homebrew formula for pipx already does that, but it doesn't work without this change

Fixes #473

@segevfiner
Copy link
Contributor Author

@kislyuk

@kislyuk
Copy link
Owner

kislyuk commented Mar 2, 2024

Please add some comments next to the conditional describing what zsh_eval_context is expected to be when evaluating a shell completion autoload script vs. a script sourced directly by an rc file or shell command.

@codecov-commenter
Copy link

codecov-commenter commented Mar 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.17%. Comparing base (521082e) to head (faf8ee0).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #475   +/-   ##
========================================
  Coverage    81.17%   81.17%           
========================================
  Files           10       10           
  Lines          786      786           
========================================
  Hits           638      638           
  Misses         148      148           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@segevfiner
Copy link
Contributor Author

@kislyuk Added a comment

@kislyuk
Copy link
Owner

kislyuk commented Mar 3, 2024

Hmm, that is not a comment and it is not what I was looking for.

Copy link
Contributor Author

@segevfiner segevfiner left a comment

Choose a reason for hiding this comment

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

Oops, sorry, committed the test code instead of the comment, fixed it now.

@kislyuk kislyuk merged commit dd79ddf into kislyuk:develop Mar 4, 2024
24 checks passed
@kislyuk
Copy link
Owner

kislyuk commented Mar 4, 2024

LGTM, thanks.

@kislyuk
Copy link
Owner

kislyuk commented Mar 8, 2024

Released in v3.2.3, please test

@segevfiner segevfiner deleted the lazy-zsh-completion branch March 8, 2024 22:49
@segevfiner
Copy link
Contributor Author

@kislyuk Seems to work. Though the other problem that I opened #474 for is still there of course.

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.

Generating lazy completion scripts for Bash/Zsh
3 participants