Terminal tab titles in Termhint
Updated 19 November 2026All docs
Termhint can set your terminal's tab and window title before each prompt: the folder, the git branch, the running command, the user, the host and words of your own, in your order, each with an icon if you want. It is off by default. For an overview, see tab titles.
What the title shows
| Part | What it shows | Shown by default |
|---|---|---|
folder |
The current folder, as ~/… under your home folder |
Yes |
command |
The command while it runs (zsh only) | Yes |
git-branch |
The git branch of the repository you are in | No |
user |
Your user name | No |
host |
The computer's name | No |
text-1, text-2, … |
Words of your own | Yes, once added |
- Parts are joined by a separator,
—by default. - A part without a value (no branch outside a repository) is left out with its separator.
- The title is cut at 100 characters.
Turn it on in Settings
Settings → Terminal → Tab Title:
- Turn on Set the tab title. Open zsh and bash tabs show the parts and follow each change.
- Click the title in the terminal preview's title bar, or a part under Parts, to show or hide it, move it earlier or later, or give it an icon (shown before it, with a space between).
- Between parts sets the separator.
- Add Text adds a part with words of your own; its menu has Remove to take it out again.
Open tabs change at once.
From the command line
termhint settings set terminals.tab-title on # off: the terminal's own title (the default)
termhint settings set terminals.tab-title.order folder,git-branch,command
termhint settings set terminals.tab-title.git-branch.on on
termhint settings set terminals.tab-title.folder.icon '▸' # shown before the part
termhint settings set terminals.tab-title.folders 2 # the last 2 folders; 0: the whole path
termhint settings set terminals.tab-title.separator ' · '
termhint settings set terminals.tab-title.text-1.text work # adds a text part
termhint settings reset terminals.tab-title.text-1 # removes it
termhint settings list terminals.tab-title # every tab title setting and its value
Settings keys
| Key | Values | Default | What it does |
|---|---|---|---|
terminals.tab-title |
on, off |
off |
Termhint sets the tab and window title; off gives open tabs the terminal's own title back |
terminals.tab-title.separator |
text, at most 40 characters | — |
What shows between two parts; empty puts them right next to each other |
terminals.tab-title.folders |
0 to 20 |
0 |
How many trailing folders the folder part shows; 0 shows the whole path |
terminals.tab-title.order |
part ids, comma-separated | folder,command,git-branch,user,host |
The parts listed come first, in that order; the others keep their order after them |
terminals.tab-title.<part>.on |
on, off |
see the table above | Whether the title shows the part |
terminals.tab-title.<part>.icon |
text, at most 40 characters | empty | What shows before the part, with a space between |
terminals.tab-title.text-<n>.text |
text, at most 40 characters | What a text part says. Setting it the first time adds the part at the end; termhint settings reset terminals.tab-title.text-<n> removes it |
<part> is folder, git-branch, command, user, host or text-<n>. See
Settings reference for every key.
The design is saved in ~/.config/termhint/tab-title.json, so it stays when you remove the shell
integration.
Icons in the title
A part's icon can be an emoji, a symbol, or a Nerd Font icon. Terminals draw titles with the system font: it finds the Material Design Nerd Font icons (U+F0000 and up) in an installed Nerd Font, but not the older Nerd Font icons below U+F0000, which show as a box. To install a Nerd Font, see Terminal icons.
Shells and terminals
- zsh and bash set the title before each prompt with OSC 0, which sets both the tab and the window title. It needs the shell integration (see Install).
- The command part shows only in zsh, while the command runs: bash has no hook that sees a command line before it runs.
- Not inside tmux or screen.
- What a terminal adds around the title comes from its own settings. Terminal, for example, can add the process name and the window size.
- Control characters in a folder name, a command or your own text never reach the terminal as escape sequences.
Turn it off
termhint settings set terminals.tab-title off
Or turn off Set the tab title in Settings → Terminal → Tab Title. Open tabs get the terminal's own title back.