Skip to content

Instantly share code, notes, and snippets.

@refactor8
Created July 18, 2017 00:50
Show Gist options
  • Save refactor8/498886aeb1298f0b9f24e13625eac4a2 to your computer and use it in GitHub Desktop.
Save refactor8/498886aeb1298f0b9f24e13625eac4a2 to your computer and use it in GitHub Desktop.
Set iTerm2 tab titles to current directory
# Set iTerm2 tab titles
tabTitle() { echo -ne "\033]0;"$*"\007"; }
# Always list directory contents and set title upon 'cd'
cd() { builtin cd "$@"; ls -lFah; tabTitle ${PWD##*/}; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment