Skip to content

Instantly share code, notes, and snippets.

View sorja's full-sized avatar
🥰

Miró Sorja sorja

🥰
View GitHub Profile
@sorja
sorja / current-dir-in-iterm-tab-title.sh
Last active July 15, 2018 16:30 — forked from phette23/current-dir-in-iterm-tab-title.sh
Set the iTerm tab title to the current directory, not full path.
if [ $ITERM_SESSION_ID ]; then
DISABLE_AUTO_TITLE="true"
echo -ne "\033];${PWD##*/}\007"
fi
precmd() {
echo -ne "\033];${PWD##*/}\007"
}