from http://unix.stackexchange.com/a/186167/13739
Create a function in ~/.bashrc:
function set-title() {
if [[ -z “$ORIG” ]]; then
ORIG=$PS1
fi
TITLE=”\[\e]2;$@\a\]”
PS1=${ORIG}${TITLE}
}
Then use your new command to set the terminal title. It works with spaces in the name tooset-title my new tab title
No Comments
You can leave the first : )