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

cli: set click_types.Path for -r and -e options #5352

Merged
merged 2 commits into from
Sep 21, 2022
Merged

cli: set click_types.Path for -r and -e options #5352

merged 2 commits into from
Sep 21, 2022

Conversation

exploide
Copy link
Contributor

@exploide exploide commented Sep 11, 2022

The issue

pipenv can generate its own shell completions using the click framework. Prior to this PR, there are no file/path completions for the -r and -e options. See #3478 for a discussion.

The fix

This PR changes the option type to click_types.Path for -r and -e. This is enough for click to know that file/path completions are desired here.
And this isn't only beneficial for fish shell, it automatically applies to bash and zsh also.

This fixes partially issue #3478 but not the part concerning pipenv run completions.

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

I'm not sure whether the news fragment is mandatory and which type would be appropriate. If you tell me, I could add one.

this enables click to generate shell auto completions for files/paths
see #3478
@oz123
Copy link
Contributor

oz123 commented Sep 12, 2022

Can you please add a news file?

@exploide
Copy link
Contributor Author

Can you please add a news file?

done

@oz123 oz123 requested a review from matteius September 15, 2022 21:46
@matteius matteius merged commit aa79e59 into pypa:main Sep 21, 2022
@exploide exploide deleted the options-file-type branch September 21, 2022 08:25
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.

3 participants