Skip to content

Instantly share code, notes, and snippets.

@jobliz
Created May 4, 2020 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jobliz/f31b5eeac16f8b6649907fa00243d9c2 to your computer and use it in GitHub Desktop.
Save jobliz/f31b5eeac16f8b6649907fa00243d9c2 to your computer and use it in GitHub Desktop.
Bash function to set terminal title. Put it in .bashrc
function set-title(){
if [[ -z "$ORIG" ]]; then
ORIG=$PS1
fi
TITLE="\[\e]2;$*\a\]"
PS1=${ORIG}${TITLE}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment