Skip to content

Commit

Permalink
Document completion setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mfussenegger committed Nov 11, 2023
1 parent 5c4a512 commit e4215fd
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ TOC
- `Why cr8? 🤔`_
- `Install 💾`_
- `Usage`_
- `Shell completion`_
- `Sub-commands`_
- `timeit 🕐`_
- `insert-fake-data`_
Expand Down Expand Up @@ -103,6 +104,21 @@ like this::
cr8 <subcommand> --hosts http://username:password@localhost:4200 <remaining args>


Shell completion
----------------

``cr8`` supports command completion in both ``bash`` and ``zsh`` via `argcomplete`_.

- Install ``argcomplete``
- Run ``activate-global-python-argcomplete``

Make sure you're using the ``argcomplete`` > 3.0.
In older versions of ``argcomplete`` it would be necessary to use the
``bashcompinit`` compatibility layer in ``zsh`` and register the application
via ``eval "$(register-python-argcomplete cr8)"``. See the upstream
documentation for details.


Sub-commands
============

Expand Down Expand Up @@ -404,3 +420,4 @@ Run ``cr8``::
Tests are run with ``python -m unittest``

.. _jq: https://stedolan.github.io/jq/
.. _argcomplete: https://kislyuk.github.io/argcomplete/

0 comments on commit e4215fd

Please sign in to comment.