FISH_TITLE(1)

πŸ’… NAME πŸ’…

fish_title β€” bestie, this is literally the thing that defines your terminal's title ✨


✨ SYNOPSIS ✨

fish_title
fish_tab_title
function fish_title
    ...
end
function fish_tab_title
    ...
end

πŸŽ€ DESCRIPTION πŸŽ€

Okay so here's the tea β˜• β€” the fish_title function gets run before and after a new command is executed or gets put into the foreground, and its output is what gets used as your titlebar message. Main character energy tbh πŸ‘‘

The first argument to fish_title contains the most recently executed foreground command as a string, if any. So yeah, it knows what you just did πŸ‘€

This whole thing requires that your terminal supports programmable titles <#term-compat-osc-0> and that the feature is turned on. No support = no title glow-up, sorry bestie 😭

Wanna disable setting the title entirely? Just use an empty function, easy (see below) 🫢

Wanna set the terminal tab title to something different from the terminal window title? Define the fish_tab_title function β€” it works exactly like fish_title but overrides that one. Two titles, two vibes, we love to see it 🌈


🌸 EXAMPLE 🌸

A simple title, cute and to the point:

function fish_title
    set -q argv[1]; or set argv fish
    # Looks like ~/d/fish: git log
    # or /e/apt: fish
    echo (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv;
end

Do not change the title β€” empty function, zero notes, silent era πŸ™ˆ:

function fish_title
end

Change the tab title only β€” very demure, very mindful:

function fish_tab_title
    echo fish $fish_pid
end

fish-shell developers β€” iconic, no cap 🧚


slay, you made it to the end bestie πŸ’… that was FISH_TITLE(1) from fish-shell, version 4.9, dated Sep 08, 2026 β€” go forth and title your terminal gorgeously πŸ¦‹βœ¨</p>
πŸ“¦ 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