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

zsh: allow to eval zsh completion #159

Merged
merged 4 commits into from
Jan 31, 2024

Conversation

bjoernricks
Copy link
Contributor

Allow to run eval "$(my-prog --print-completion zsh)" to enable completion in the current zsh environment.

This change is inspired by pypa/pip#12173 and pallets/click#2544.

Allow to run `eval "$(my-prog --print-completion zsh)"` to enable
completion in the current zsh environment. This change is inspired by
pypa/pip#12173 and pallets/click#2544.
@casperdcl casperdcl self-requested a review January 31, 2024 14:38
@casperdcl casperdcl added enhancement New feature or request shell-zsh external-request You asked, we did labels Jan 31, 2024
Copy link
Collaborator

@casperdcl casperdcl left a comment

Choose a reason for hiding this comment

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

Thanks! Do you want to update the failing tests too?

@bjoernricks
Copy link
Contributor Author

Thanks! Do you want to update the failing tests too?

Done. The tests run successful at my machine with Python 3.11 now.

tests/test_shtab.py Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eb12748) 88.88% compared to head (6b3c4f3) 88.88%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #159   +/-   ##
=======================================
  Coverage   88.88%   88.88%           
=======================================
  Files           3        3           
  Lines         360      360           
=======================================
  Hits          320      320           
  Misses         40       40           

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

@casperdcl casperdcl merged commit e69727c into iterative:main Jan 31, 2024
5 checks passed
@bjoernricks bjoernricks deleted the zsh-eval-support branch January 31, 2024 18:59
@bjoernricks
Copy link
Contributor Author

@casperdcl would it be possible to include this change in a new release?

@casperdcl
Copy link
Collaborator

/tag v1.7.0 3b3ed28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external-request You asked, we did shell-zsh
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants