So in MacOS Catalina, the terminal kept screaming at me to update to zsh. That’s what I did. But then, my personal name and some other personal information became the title of the window.
I’ve recently started writing on Medium and I don’t want to accidentally screenshot my personal stuff. So, the first step I had to take was change the terminal window title.
With bash, you could simply just open Terminal Preferences and set the window title. But with zsh, paired with oh my zsh, the window title becomes your username and the current directory…
Here is how you change the terminal window title.
open ~/.zshrc. Then hit enter. (Or
vim ~/.zshrc, if you prefer vim)
*Update* If you’re getting a “File does not exist” error, you may first have to create .zshrc manually like this:
2. TextEdit (or vim) should open. Now, search for
3. Now, delete the
# in front of the
DISABLE_AUTO_TITLE=”true”. Then press
S to save. You can close TextEdit now.
4. Go back to terminal, and type
5. Now, open terminal preferences by pressing
,. Then, head over to “Profiles” and then “Window” (Shown below).
6. Now, type whatever name you want for the terminal title! Also, uncheck:
- Working directory or document
- Active process name
- Shell command name
- Profile name
- TTY name
- Command key
7. Now, close terminal by pressing
W. Then, open terminal again, and your title should be whatever you set it to be!