Back to Fish

fish_tab_title - define the terminal tab’s title¶

docs/docs/4.4/cmds/fish_tab_title.html

latest1.3 KB
Original Source

fish_tab_title - define the terminal tab’s title

Synopsis

fish\_titlefish\_tab\_title
function fish\_title...endfunction fish\_tab\_title...end

Description

The fish_title 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.

The first argument to fish_title contains the most recently executed foreground command as a string, if any.

This requires that your terminal supports programmable titles and the feature is turned on.

To disable setting the title, use an empty function (see below).

To set the terminal tab title to something other than the terminal window title, define the fish_tab_title function, which works like fish_title but overrides that one.

Example

A simple title:

function fish\_titleset -q argv[1]; or set argv fish# Looks like ~/d/fish: git log# or /e/apt: fishecho (fish\_prompt\_pwd\_dir\_length=1 prompt\_pwd): $argv;end

Do not change the title:

function fish\_titleend

Change the tab title only:

function fish\_tab\_titleecho fish $fish\_pidend