2

currently this is how my terminal bar looks like, it's showing my full name and the hostname. I'd like to configure it so that this is removed and it only shows the directory, but I don't know how.

enter image description here

3
  • Please enter the following command into your Terminal: [return]echo "${PS1}" [return] and insert the result within your original question (OQ).
    – dan
    Jul 22, 2019 at 10:01
  • I inputted echo "${PS1}" into the terminal and got this output ${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info). Didn't seem to change anything.
    – BP9381
    Jul 22, 2019 at 10:04
  • Please enter the following command into your Terminal: [return] echo "$(git_prompt_info)" [return] and insert the result within your original question (OQ)
    – dan
    Jul 22, 2019 at 10:16

3 Answers 3

2

Since you're using zsh you can edit your ~/.zshrc file to include this:

DISABLE_AUTO_TITLE="true"

See here for details: https://github.com/ohmyzsh/ohmyzsh/issues/5700#issuecomment-311998546

3
  • 1
    Solved my issue. Aug 11, 2020 at 18:20
  • 1
    Out of many other solutions this one did the job
    – naz
    Oct 2, 2021 at 2:32
  • Will enabling this setting hide the "users/<username>" in all terminal outputs? Jan 17 at 21:24
1

If you go into Terminal and press Cmd + ,, it will open up the preferences. Click the Profiles tab on the top.

Then click the Window tab.

Then you can set a title and uncheck the "Working directory", "Active Process", and everything else under the Title section.

This will make it look like this:

2
  • 1
    This doesn't work. I unchecked everything, but it still shows username@hostname.
    – BP9381
    Jul 22, 2019 at 6:52
  • @BP9381, can you edit your post to show a screenshot of the "Window" page?
    – leon
    Jul 23, 2019 at 2:49
0

I followed these steps on my MAC

  1. nano ~/.zshrc
  2. add DISABLE_AUTO_TITLE="true"
  3. go to Preferences of your terminal
  4. Under profile > window, change the title to whatever you want >

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .