Skip to content

Instantly share code, notes, and snippets.

@reinh
Created February 24, 2020 19:51
Show Gist options
  • Save reinh/c67fb99b85d857dee42e71e5cb283938 to your computer and use it in GitHub Desktop.
Save reinh/c67fb99b85d857dee42e71e5cb283938 to your computer and use it in GitHub Desktop.
Set iTerm2 window title to relative PWD (~/foo)
function set-window-title {
echo -ne "\e]1;$(dirs)\a"
}
set-window-title
add-zsh-hook precmd set-window-title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment