Files
pytest2/doc/en/bash-completion.rst
Daniele Procida d2d975d6cf Reworded titles of some clear how-to guides
Files retitled:

assert.rst
bash-completion.rst
capture.rst
existingtestsuite.rst
mark.rst
monkeypatch.rst
nose.rst
parametrize.rst
plugins.rst
skipping.rst
tmpdir.rst
usage.rst
2021-03-10 20:26:06 +00:00

34 lines
777 B
ReStructuredText

.. _bash_completion:
How to set up bash completion
=============================
When using bash as your shell, ``pytest`` can use argcomplete
(https://argcomplete.readthedocs.io/) for auto-completion.
For this ``argcomplete`` needs to be installed **and** enabled.
Install argcomplete using:
.. code-block:: bash
sudo pip install 'argcomplete>=0.5.7'
For global activation of all argcomplete enabled python applications run:
.. code-block:: bash
sudo activate-global-python-argcomplete
For permanent (but not global) ``pytest`` activation, use:
.. code-block:: bash
register-python-argcomplete pytest >> ~/.bashrc
For one-time activation of argcomplete for ``pytest`` only, use:
.. code-block:: bash
eval "$(register-python-argcomplete pytest)"