Tab titles
macOS terminal tab titles you design yourself
Last checked 17 November 2026
In short: Termhint can set the terminal tab name for you before each prompt: the folder, the git branch, the running command, user, host and words of your own, in the order you choose, each with an icon if you want one. It is off by default, so your terminal keeps its own title until you turn it on.
What a tab title can show
| Part | What it shows |
|---|---|
folder | The current folder, as ~/… under your home folder. Choose how many of the last folders to show, or 0 for the whole path. |
git-branch | The branch of the repository you are in |
command | The command while it runs (zsh only) |
user, host | Your user name and the Mac's name |
text-1, text-2, … | Words of your own |
A part with no value, such as the branch outside a repository, is left out together with its separator.
Set it up
In Settings → Terminal → Tab Title, click the title in the preview's title bar to show or hide a part, move it, give it an icon, or add your own words. Open tabs change at once. The same settings 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 yes
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
The design is saved in ~/.config/termhint/tab-title.json, so it stays if you remove the shell integration.
Icons in the tab title
A part can start with an emoji, a symbol or a Nerd Font icon. Terminals draw titles with the system font, which 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; those show as a box. termhint icons install installs a Nerd Font; see terminal icons.
Which shells and terminals
- zsh and bash set the title before each prompt with the standard OSC 0 sequence, which sets both the tab and the window title. The command part shows in zsh only: bash has no hook that sees a command line before it runs.
- It works in the terminals Termhint supports. Warp is not supported.
- What a terminal adds around the title comes from its own settings. The macOS Terminal app, for example, can add the process name and the window size; turn those off in Terminal's profile settings if you want only Termhint's title.
- Not inside tmux or screen.
- Control characters in a folder name, a command or your own text never reach the terminal as escape sequences.
The tab title is made the same way as the prompt; see prompt themes for that.