-
Notifications
You must be signed in to change notification settings - Fork 3k
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 #11842
Quote extras to guard shells with glob qualifiers #11842
Conversation
@uranusjr As you had some thoughts over on Issue #11811 I thought I'd tag you here for review as well. While I agree that quoting pip/docs/html/cli/pip_install.rst Line 280 in 4b14e7c
to
could be useful I'm not sure if additionally quoting pip/docs/html/cli/pip_install.rst Line 279 in 4b14e7c
to
really helps. What are your thoughts? |
Yea, quoting simple names is probably not worthwhile. Quote everything that’s not a bare package name seems like a reasonable rule of thumb to send to shell beginners to me. I wonder if it’s a good idea to use single quotes instead of double in the Linux/Mac part. |
Could you add a |
Yeah, I think single quotes would be better. I was using double quotes to follow the existing standard of the page in PR #8589. I'll switch everything over to single quotes unless someone objects.
Sure! |
d33a2f9
to
8c8cf0e
Compare
8c8cf0e
to
cd4b251
Compare
I don’t think double quotes work on cmd.exe, so we’ll need to stick with double quotes there (it’s still used by a lot of newcomers). Otherwise looks good to me. |
Okay let me revert those.
I've now applied that in the second commit |
2146414
to
2b79e42
Compare
All style changes are now applied: Single quotes are used for Linux/Mac and double quotes are used for Windows to follow existing style conventions. (sorry for the multiple force pushes, I apparently can't spell well in my commit messages.) |
2b79e42
to
3a7c500
Compare
* 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.
* As a means to make things easier for new users, quote everything in a `pip install` command that is part of a package that isn't just a bare package name. * Use single quotes for Linux/Mac and use double quotes for Windows to follow existing style conventions.
3a7c500
to
ced4569
Compare
* As pointed out by Henry in PR 1216, adding quotes to version information on packages provides safeguards against common mistakes. Additionally this matches style with pypa/pip#11842.
* As pointed out by Henry in PR 1216, adding quotes to version information on packages provides safeguards against common mistakes. Additionally this matches style with pypa/pip#11842.
Resolves #11811
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.ANEWS.rst
is not included as this documentation change is minor enough that I assume it would be considered "trivial" in the context of> The NEWS.rst file is managed using towncrier and all non trivial changes must be accompanied by a news entry.If the maintainers would like aNEWS.rst
for this PR I will happily provide one though.