summaryrefslogtreecommitdiff
path: root/doc/en/bash-completion.rst
blob: eaa07881414ddaf8c6f0a4ea21a83257bfe1a2df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

.. _bash_completion:

Setting 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)"