Skip to content

Instantly share code, notes, and snippets.

@treyharris
Created February 24, 2016 19:26
Show Gist options
  • Save treyharris/88b97b014761523d5272 to your computer and use it in GitHub Desktop.
Save treyharris/88b97b014761523d5272 to your computer and use it in GitHub Desktop.
# -*-shell-script-*-
function title () {
case $TERM in
screen*) echo -ne "\ek$*\e\\"
;;
tmux*) printf '\033]2;%s\033\\' "$*"
;;
*) echo -ne "\033]0;$*\007"
;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment