Set terminal title in BASH

function test() {
    echo -e "\033k$1\033\\"
}

Then source it and set your title.

$ source ~/.bashrc
$ title "title"