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

Quote extras to guard shells with glob qualifiers #1216

Conversation

matthewfeickert
Copy link
Contributor

Resolves #1209

Shells like zsh have glob qualifiers that will error if an extra is not quoted. While the glob qualifiers can be disabled, adding quotes guards against errors if people are copy-pasting or do not know that they can disable the behavior.

@matthewfeickert
Copy link
Contributor Author

cc @sinoroc

@matthewfeickert
Copy link
Contributor Author

I've opened a similar PR over at pip: pypa/pip#11842

@matthewfeickert matthewfeickert force-pushed the feat/quote-extras-to-guard-aginst-globbing-shells branch from ddc11d4 to 05b2c0d Compare March 6, 2023 07:02
@matthewfeickert matthewfeickert force-pushed the feat/quote-extras-to-guard-aginst-globbing-shells branch from 05b2c0d to b9c377f Compare March 14, 2023 05:24
* Shells like zsh have glob qualifiers that will error if an extra
  is not quoted. While the glob qualifiers can be disabled, adding
  quotes guards against errors if people are copy-pasting or do not
  know that they can disable the behavior.
* Use single quotes for Linux/Mac and use double quotes for Windows
  to follow existing style conventions.
@matthewfeickert matthewfeickert force-pushed the feat/quote-extras-to-guard-aginst-globbing-shells branch from b9c377f to 294a131 Compare March 15, 2023 21:00
@matthewfeickert
Copy link
Contributor Author

This is ready for review, so gentle ping to @henryiii and @pradyunsg if they have time.

Copy link
Contributor

@henryiii henryiii left a comment

Choose a reason for hiding this comment

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

I'm in favor, I always add the quotes to be safe - it's also easy to write pip install x>3 and not know why you suddenly have a file 3 and no output. :)

@bhrutledge bhrutledge merged commit fcecd11 into pypa:main Mar 15, 2023
@matthewfeickert matthewfeickert deleted the feat/quote-extras-to-guard-aginst-globbing-shells branch March 15, 2023 22:05
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.

Quote extras to avoid problems with glob qualifiers in shells
4 participants