Forked from phette23/current-dir-in-iterm-tab-title.sh
Last active
July 15, 2018 16:30
-
-
Save sorja/6b96f40c2a6989a9e4382bf1ae86aaf5 to your computer and use it in GitHub Desktop.
Set the iTerm tab title to the current directory, not full path.
This file contains 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
if [ $ITERM_SESSION_ID ]; then | |
DISABLE_AUTO_TITLE="true" | |
echo -ne "\033];${PWD##*/}\007" | |
fi | |
precmd() { | |
echo -ne "\033];${PWD##*/}\007" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated. Previous revision caused problems if had something in PROMPT_COMMAND & don't think best idea to append there.