Skip to content

Commit

Permalink
Quote extras to guard shells with glob qualifiers
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
matthewfeickert committed Mar 6, 2023
1 parent 4b14e7c commit cc2e715
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 10 additions & 10 deletions docs/html/cli/pip_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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] @ 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 '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
#. Install a particular source archive file.

Expand Down
2 changes: 2 additions & 0 deletions news/11842.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Quote extras in the pip install docs to guard shells with default glob
qualifiers, like zsh.

0 comments on commit cc2e715

Please sign in to comment.