.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "FISH_MODE_PROMPT" "1" "Nov 13, 2025" "4.2" "fish-shell" .SH NAME fish_mode_prompt \- define the appearance of the mode indicator .SH SYNOPSIS .nf \fBfish_mode_prompt\fP .fi .sp .INDENT 0.0 .INDENT 3.5 .sp .EX function fish_mode_prompt echo \-n \(dq$fish_bind_mode \(dq end .EE .UNINDENT .UNINDENT .SH DESCRIPTION .sp The \fBfish_mode_prompt\fP function outputs the mode indicator for use in vi mode. .sp The default \fBfish_mode_prompt\fP 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 \fB$fish_bind_mode variable\fP can be used to determine the current mode. It will be one of \fBdefault\fP, \fBinsert\fP, \fBreplace_one\fP, \fBreplace\fP, or \fBvisual\fP\&. .sp You can also define an empty \fBfish_mode_prompt\fP function to remove the vi mode indicators: .INDENT 0.0 .INDENT 3.5 .sp .EX function fish_mode_prompt; end funcsave fish_mode_prompt .EE .UNINDENT .UNINDENT .sp \fBfish_mode_prompt\fP 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 (\fI\%fish_prompt\fP and \fI\%fish_right_prompt\fP) will be executed as well in case they contain a mode display. .sp If \fI\%fish_transient_prompt\fP is set to 1, \fBfish_mode_prompt \-\-final\-rendering\fP is run before executing the commandline. .SH EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .EX function fish_mode_prompt switch $fish_bind_mode case default set_color \-\-bold red echo \(aqN\(aq case insert set_color \-\-bold green echo \(aqI\(aq case replace_one set_color \-\-bold green echo \(aqR\(aq case replace set_color \-\-bold bryellow echo \(aqR\(aq case visual set_color \-\-bold brmagenta echo \(aqV\(aq case \(aq*\(aq set_color \-\-bold red echo \(aq?\(aq end set_color normal end .EE .UNINDENT .UNINDENT .sp Outputting multiple lines is not supported in \fBfish_mode_prompt\fP\&. .SH COPYRIGHT fish-shell developers .\" Generated by docutils manpage writer. .