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
π Copyright π
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