Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
FISH_MODE_PROMPT(1)		  fish-shell		   FISH_MODE_PROMPT(1)

NAME
       fish_mode_prompt	- define the appearance	of the mode indicator

SYNOPSIS
	  function fish_mode_prompt
	       echo -n "$fish_bind_mode	"
	  end

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. De-
       fine your own function to customize the appearance of the mode  indica-
       tor.  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 de-
       termine	the  current  mode.  It	 will  be  one of default, insert, re-
       place_one, or visual.

       fish_mode_prompt	will be	executed when the vi mode changes. If it  pro-
       duces  any  output, it is displayed and used. If	it does	not, the other
       prompt functions	(fish_prompt and fish_right_prompt) will  be  executed
       as well in case they contain a mode display.

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.

COPYRIGHT
       2019, fish-shell	developers

3.1				 Aug 11, 2020		   FISH_MODE_PROMPT(1)

NAME | SYNOPSIS | DESCRIPTION | EXAMPLE | COPYRIGHT

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=fish_mode_prompt&sektion=1&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help