Created
July 18, 2017 00:50
-
-
Save refactor8/498886aeb1298f0b9f24e13625eac4a2 to your computer and use it in GitHub Desktop.
Set iTerm2 tab titles to current directory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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