docs: Adapt shell completion subsection (#3672)

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
This commit is contained in:
Julien Jerphanion 2024-12-09 15:39:17 +01:00 committed by GitHub
parent 53ba5c0326
commit 9d6281c5ed
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 27 deletions

View File

@ -230,30 +230,3 @@ The executable can be striped to remove its size:
.. code:: bash
strip "build/micromamba/micromamba"
.. _shell_completion:
Shell completion
****************
For now, only ``micromamba`` provides shell completion on ``bash`` and ``zsh``.
To activate it, it's as simple as running:
.. code:: bash
micromamba shell completion
The completion is now available in any new shell opened or in the current shell after sourcing the configuration file to take modifications into account.
.. code-block:: sh
source ~/.<shell>rc
| Just hit ``<TAB><TAB>`` to get completion when typing your command.
| For example the following command will help you to pick a named environment to activate:
.. code-block:: bash
micromamba activate <TAB><TAB>

View File

@ -85,3 +85,18 @@ Deactivation
************
The *deactivation* is the opposite operation of :ref:`activation<activation>`, removing from your shell what makes the environment content accessible.
.. _shell_completion:
Shell completion
****************
After initialization, shell completion is available in any new shell.
Just hit ``<TAB><TAB>`` to get completion when typing your command.
For example the following command will help you to pick a named environment to activate:
.. code-block:: bash
micromamba activate <TAB><TAB>