diff options
author | Fabian Homborg <FHomborg@gmail.com> | 2016-06-21 19:06:44 +0200 |
---|---|---|
committer | Fabian Homborg <FHomborg@gmail.com> | 2016-06-26 11:36:31 +0200 |
commit | a3e9e179eb51476f3c700e485268db45d367f408 (patch) | |
tree | 000afaf6866d686ff4fadd4d00558ce12df430b9 | |
parent | 0f3b4d2bd8e28281c876226b4e9c5e8f02c62872 (diff) |
Document fish_mode_prompt
-rw-r--r-- | doc_src/fish_mode_prompt.txt | 11 | ||||
-rw-r--r-- | doc_src/index.hdr.in | 6 |
2 files changed, 17 insertions, 0 deletions
diff --git a/doc_src/fish_mode_prompt.txt b/doc_src/fish_mode_prompt.txt new file mode 100644 index 00000000..b35d4ce4 --- /dev/null +++ b/doc_src/fish_mode_prompt.txt @@ -0,0 +1,11 @@ +\section fish_mode_prompt fish_mode_prompt - define the appearance of the mode indicator + +\subsection fish_mode_prompt-synopsis Synopsis + +fish_mode_prompt will output the mode indicator for use in vi-mode. + +\subsection fish_mode_prompt-description Description + +The output of `fish_mode_prompt` will be displayed in the mode indicator position to the left of the regular prompt. + +Multiple lines are not supported in `fish_mode_prompt`. diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index a25bf4c5..49d8552d 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -1012,6 +1012,8 @@ You can change these key bindings using the <a href="commands.html#bind">bind</a Vi mode allows for the use of Vi-like commands at the prompt. Initially, <a href="#vi-mode-insert">insert mode</a> is active. @key{Escape} enters <a href="#vi-mode-command">command mode</a>. The commands available in command, insert and visual mode are described below. Vi mode builds on top of <a href="#emacs-mode">Emacs mode</a>, so all keybindings mentioned there that do not contradict the ones mentioned here also work. +When in vi-mode, the <a href="fish_mode_prompt.html">`fish_mode_prompt`</a> function will display a mode indicator to the left of the prompt. The `fish_vi_cursor` function is available to change the cursor's shape depending on the mode in supported terminals. + \subsubsection vi-mode-command Command mode Command mode is also known as normal mode. @@ -1200,6 +1202,10 @@ function fish_title end \endfish +\subsection prompt Programmable prompt + +When fish waits for input, it will display a prompt by evaluating the `fish_prompt` and `fish_right_prompt` functions. The output of the former is displayed on the left and the latter's output on the right side of the terminal. The output of `fish_mode_prompt` will be prepended on the left, though the default function only does this when in <a href="index.html#vi-mode">vi-mode</a>. + \subsection greeting Configurable greeting If a function named `fish_greeting` exists, it will be run when entering interactive mode. Otherwise, if an environment variable named `fish_greeting` exists, it will be printed. |