Update docs for transient prompt

Closes #11153
This commit is contained in:
Johannes Altmanninger
2025-04-12 11:02:03 +02:00
parent 6e85e5f6a0
commit b569f0d62f
8 changed files with 18 additions and 29 deletions

View File

@@ -20,11 +20,11 @@ Synopsis
Description
-----------
The ``fish_prompt`` function is executed when the prompt is to be shown and, if ``fish_transient_prompt`` is set to 1, before running a commandline. The output of this function is used as a prompt.
The ``fish_prompt`` function is executed when the prompt is to be shown, and the output is used as a prompt.
The exit status of commands within ``fish_prompt`` will not modify the value of :ref:`$status <variables-status>` outside of the ``fish_prompt`` function.
When the function is executed before running a commandline, it is passed a ``--final-rendering`` argument.
If :envvar:`fish_transient_prompt` is set to 1, ``fish_prompt --final-rendering`` is run before executing the commandline.
``fish`` ships with a number of example prompts that can be chosen with the ``fish_config`` command.