mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-28 16:01:15 -03:00
docs: link and explicit instructions on creating a blank fish_mode_prompt
Work on #5783. [ci skip]
This commit is contained in:
@@ -18,10 +18,14 @@ Description
|
||||
|
||||
The ``fish_mode_prompt`` function outputs the mode indicator for use in vi-mode.
|
||||
|
||||
The default ``fish_mode_prompt`` function will output indicators about the current Vi editor mode displayed to the left of the regular prompt. Define your own function to customize the appearance of the mode indicator. You can also define an empty ``fish_mode_prompt`` function to remove the Vi mode indicators. The ``$fish_bind_mode variable`` can be used to determine the current mode. It
|
||||
will be one of ``default``, ``insert``, ``replace_one``, or ``visual``.
|
||||
The default ``fish_mode_prompt`` function will output indicators about the current Vi editor mode displayed to the left of the regular prompt. Define your own function to customize the appearance of the mode indicator. The ``$fish_bind_mode variable`` can be used to determine the current mode. It will be one of ``default``, ``insert``, ``replace_one``, or ``visual``.
|
||||
|
||||
fish_mode_prompt will be executed when the vi mode changes. If it produces any output, it is displayed and used. If it does not, the other prompt functions (:ref:`fish_prompt <cmd-fish_prompt>` and :ref:`fish_right_prompt <cmd-fish_right_prompt>`) will be executed as well in case they contain a mode display.
|
||||
You can also define an empty ``fish_mode_prompt`` function to remove the Vi mode indicators::
|
||||
|
||||
function fish_mode_prompt; end
|
||||
funcsave fish_mode_prompt
|
||||
|
||||
``fish_mode_prompt`` will be executed when the vi mode changes. If it produces any output, it is displayed and used. If it does not, the other prompt functions (:ref:`fish_prompt <cmd-fish_prompt>` and :ref:`fish_right_prompt <cmd-fish_right_prompt>`) will be executed as well in case they contain a mode display.
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
Reference in New Issue
Block a user