FISH_MODE_PROMPT(1)

✨ FISH_MODE_PROMPT ✨

ok so bestie, this is a page from the fish-shell manual and it's literally all about fish_mode_prompt β€” the little function that decides what your vi mode indicator looks like πŸ’…

🌸 NAME 🌸

fish_mode_prompt β€” define the appearance of the mode indicator πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

fish_mode_prompt

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

The default fish_mode_prompt function will output indicators about the current vi editor mode, displayed to the left of your regular prompt. If you want your mode indicator to look different, define your own function β€” customize away, it's giving main character energy πŸ‘‘. The $fish_bind_mode variable is what you use to figure out the current mode, and it will be one of default, insert, replace_one, replace, visual, or operator 🌈.

You can also define an empty fish_mode_prompt function to remove the vi mode indicators entirely, no cap:

function fish_mode_prompt; end
funcsave fish_mode_prompt

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

If fish_transient_prompt is set to 1, fish_mode_prompt --final-rendering is run before executing the commandline πŸ‘€.

🌸 ngl this one matters: outputting multiple lines is not supported in fish_mode_prompt. one line only bestie 😭

πŸŽ€ 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 replace
      set_color --bold bryellow
      echo 'R'
    case visual
      set_color --bold brmagenta
      echo 'V'
    case operator f F t T
      set_color --bold cyan
      echo 'N'
    case '*'
      set_color --bold red
      echo '?'
  end
  set_color --reset
end

Copyright β€” fish-shell developers 🐟

ok and that's the whole page!! this one came from the fish-shell manual, version 4.9, dated Sep 08, 2026 β€” slay, go make your prompt iconic bestie πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from
  • arch rolling: fish 4.9.3-1 Β· GPL-2.0-only AND BSD-3-Clause AND ISC AND MIT AND PSF-2.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms