bash 補完の設定方法¶
シェルとして bash を使用している場合、pytest は argcomplete (https://kislyuk.github.io/argcomplete/) を使用して自動補完を行うことができます。 これには argcomplete をインストールして そして 有効化する必要があります。
argcomplete をインストールするには:
sudo pip install 'argcomplete>=0.5.7'
すべての argcomplete 対応 Python アプリケーションをグローバルに有効化するには:
sudo activate-global-python-argcomplete
pytest を永続的に (ただしグローバルには) 有効化するには:
register-python-argcomplete pytest >> ~/.bashrc
pytest のみの argcomplete を一度だけ有効化するには:
eval "$(register-python-argcomplete pytest)"