"Fossies" - the Fresh Open Source Software Archive

Member "fish-3.0.2/share/man/man1/fish_mode_prompt.1" (19 Feb 2019, 1389 Bytes) of package /linux/misc/fish-3.0.2.tar.gz:


Caution: As a special service "Fossies" has tried to format the requested manual source page into HTML format but links to other man pages may be missing or even errorneous. Alternatively you can here view or download the uninterpreted manual source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the latest Fossies "Diffs" side-by-side code changes report for "fish_mode_prompt.1": 3.0.1_vs_3.0.2.

fish_mode_prompt

NAME

NAME

fish_mode_prompt - define the appearance of the mode indicator

Synopsis
The fish_mode_prompt function will output the mode indicator for use in vi-mode.

Description
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.

Example
function
fish_mode_prompt
switch
$fish_bind_mode
case
default
set_color
--bold red
echo
’N’
case
insert
set_color
--bold green
echo
’I’
case
replace_one
set_color
--bold green
echo
’R’
case
visual
set_color
--bold brmagenta
echo
’V’
case
’*’
set_color
--bold red
echo
’?’
end
set_color
normal
end

Outputting multiple lines is not supported in fish_mode_prompt.