.\" 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_TAB_TITLE" "1" "Nov 10, 2025" "4.2" "fish-shell"
.SH NAME
fish_tab_title \- define the terminal tab's title
.SH SYNOPSIS
.nf
\fBfish_title\fP
\fBfish_tab_title\fP
.fi
.sp
.INDENT 0.0
.INDENT 3.5
.sp
.EX
function fish_title
    ...
end


function fish_tab_title
    ...
end
.EE
.UNINDENT
.UNINDENT
.SH DESCRIPTION
.sp
The \fBfish_title\fP function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message.
.sp
The first argument to \fBfish_title\fP contains the most recently executed foreground command as a string, if any.
.sp
This requires that your terminal supports \fI\%programmable titles\fP and the feature is turned on.
.sp
To disable setting the title, use an empty function (see below).
.sp
To set the terminal tab title to something other than the terminal window title,
define the \fBfish_tab_title\fP function, which works like \fBfish_title\fP but overrides that one.
.SH EXAMPLE
.sp
A simple title:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
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
.EE
.UNINDENT
.UNINDENT
.sp
Do not change the title:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
function fish_title
end
.EE
.UNINDENT
.UNINDENT
.sp
Change the tab title only:
.INDENT 0.0
.INDENT 3.5
.sp
.EX
function fish_tab_title
    echo fish $fish_pid
end
.EE
.UNINDENT
.UNINDENT
.SH COPYRIGHT
fish-shell developers
.\" Generated by docutils manpage writer.
.
