1 2.. _bash_completion: 3 4Setting up bash completion 5========================== 6 7When using bash as your shell, ``pytest`` can use argcomplete 8(https://argcomplete.readthedocs.io/) for auto-completion. 9For this ``argcomplete`` needs to be installed **and** enabled. 10 11Install argcomplete using:: 12 13 sudo pip install 'argcomplete>=0.5.7' 14 15For global activation of all argcomplete enabled python applications run:: 16 17 sudo activate-global-python-argcomplete 18 19For permanent (but not global) ``pytest`` activation, use:: 20 21 register-python-argcomplete pytest >> ~/.bashrc 22 23For one-time activation of argcomplete for ``pytest`` only, use:: 24 25 eval "$(register-python-argcomplete pytest)" 26