From d03ec2cc6bd6bb3766bb3ed116129ede5638d133 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 24 Oct 2021 21:18:18 +0200 Subject: [PATCH] docs/interactive: Some rewording. --- doc_src/interactive.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc_src/interactive.rst b/doc_src/interactive.rst index 5f8c19a7d..281bf47ec 100644 --- a/doc_src/interactive.rst +++ b/doc_src/interactive.rst @@ -187,7 +187,7 @@ This is an alternative to aliases, and has the advantage that you see the actual Programmable title ------------------ -When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the :ref:`fish_title ` function. The :ref:`fish_title ` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message. The :ref:`status current-command ` builtin will always return the name of the job to be put into the foreground (or ``fish`` if control is returning to the shell) when the `fish_prompt ` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2. +When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the :ref:`fish_title ` function. The :ref:`fish_title ` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message. The :ref:`status current-command ` builtin will always return the name of the job to be put into the foreground (or ``fish`` if control is returning to the shell) when the :ref:`fish_prompt ` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2. Examples: The default fish title is:: @@ -209,14 +209,16 @@ To show the last command in the title:: Programmable prompt ------------------- -When fish waits for input, it will display a prompt by evaluating the :ref:`fish_prompt ` and :ref:`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 :ref:`fish_mode_prompt ` will be prepended on the left, though the default function only does this when in :ref:`vi-mode `. +When it is fish's turn to ask for input (like after it started or the command ended), it will show a prompt. It does this by running the :ref:`fish_prompt ` and :ref:`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 :ref:`fish_mode_prompt ` will be prepended on the left, though the default function only does this when in :ref:`vi-mode `. .. _greeting: Configurable greeting --------------------- -If a function named :ref:`fish_greeting ` exists, it will be run when entering interactive mode. Otherwise, if an environment variable named :ref:`fish_greeting ` exists, it will be printed. +When it is started interactively, fish tries to run the :ref:`fish_greeting ` function. The default fish_greeting prints a simple greeting. You can change its text by changing the ``$fish_greeting`` variable. .. _private-mode: