mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Quote extras to guard shells with glob qualifiers
* 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.
This commit is contained in:
parent
83c800d3b8
commit
9a82bdfc52
2 changed files with 11 additions and 9 deletions
|
@ -386,21 +386,21 @@ Examples
|
|||
|
||||
.. code-block:: shell
|
||||
|
||||
python -m pip install SomePackage[PDF]
|
||||
python -m pip install "SomePackage[PDF] @ git+https://git.repo/SomePackage@main#subdirectory=subdir_path"
|
||||
python -m pip install .[PDF] # project in current directory
|
||||
python -m pip install SomePackage[PDF]==3.0
|
||||
python -m pip install SomePackage[PDF,EPUB] # multiple extras
|
||||
python -m pip install 'SomePackage[PDF]'
|
||||
python -m pip install 'SomePackage[PDF] @ git+https://git.repo/SomePackage@main#subdirectory=subdir_path'
|
||||
python -m pip install '.[PDF]' # project in current directory
|
||||
python -m pip install 'SomePackage[PDF]==3.0'
|
||||
python -m pip install 'SomePackage[PDF,EPUB]' # multiple extras
|
||||
|
||||
.. tab:: Windows
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
py -m pip install SomePackage[PDF]
|
||||
py -m pip install "SomePackage[PDF]"
|
||||
py -m pip install "SomePackage[PDF] @ git+https://git.repo/SomePackage@main#subdirectory=subdir_path"
|
||||
py -m pip install .[PDF] # project in current directory
|
||||
py -m pip install SomePackage[PDF]==3.0
|
||||
py -m pip install SomePackage[PDF,EPUB] # multiple extras
|
||||
py -m pip install ".[PDF]" # project in current directory
|
||||
py -m pip install "SomePackage[PDF]==3.0"
|
||||
py -m pip install "SomePackage[PDF,EPUB]" # multiple extras
|
||||
|
||||
#. Install a particular source archive file.
|
||||
|
||||
|
|
2
news/11842.doc.rst
Normal file
2
news/11842.doc.rst
Normal file
|
@ -0,0 +1,2 @@
|
|||
Quote extras in the pip install docs to guard shells with default glob
|
||||
qualifiers, like zsh.
|
Loading…
Reference in a new issue