MacOS – How to get local directory names into terminal window titles

bashcommand linemacosterminalzsh

The title of my terminal window is:

Terminal — bash — 130×39

This is how I see them listed in Terminal->Window and it is very hard to know which one is which.

When I use multiple terminals, the most important information is the local directory in each of them.

Is there any way to have that local directory appear in the titles, so I could see easily which terminal is from where?

Best Answer

Go to Preferences -> Profiles -> Window and check those things you would like to see in the terminal window title.

enter image description here