Skip to content

Instantly share code, notes, and snippets.

@joshuaebowling
Created January 16, 2023 18:18
Show Gist options
  • Save joshuaebowling/24fa0e5b5333dc039d10731b74cc17fd to your computer and use it in GitHub Desktop.
Save joshuaebowling/24fa0e5b5333dc039d10731b74cc17fd to your computer and use it in GitHub Desktop.
set the title of a terminal in linux (add to .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