kislyuk / argcomplete

Python and tab completion, better together.
https://kislyuk.github.io/argcomplete/
Apache License 2.0
1.39k stars 129 forks source link

Lazy completion loading for Zsh #475

Closed segevfiner closed 4 months ago

segevfiner commented 4 months ago

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 commented 4 months ago

@kislyuk

kislyuk commented 4 months ago

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 commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

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

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

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

segevfiner commented 4 months ago

@kislyuk Added a comment

kislyuk commented 4 months ago

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

kislyuk commented 4 months ago

LGTM, thanks.

kislyuk commented 3 months ago

Released in v3.2.3, please test

segevfiner commented 3 months ago

@kislyuk Seems to work. Though the other problem that I opened https://github.com/kislyuk/argcomplete/pull/474 for is still there of course.