Skip to content

Instantly share code, notes, and snippets.

@ziishaned
Created September 8, 2022 08:43
Show Gist options
  • Save ziishaned/c1151036a90e270996268ae56c673b74 to your computer and use it in GitHub Desktop.
Save ziishaned/c1151036a90e270996268ae56c673b74 to your computer and use it in GitHub Desktop.
Set the iTerm tab title to the current directory
  1. Open your ~/.zshrc file and put following inside of it:
    DISABLE_AUTO_TITLE="true"
    echo -ne "\e]1;\a"
  2. Then open the settings for iTerm2 and select PWD from the title dropdown: Screen Shot 2022-09-06 at 11 24 22 AM

Finally the tab title for iTerm2 will look something like below: Screen Shot 2022-09-06 at 11 26 38 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment