fix .bash_prompt

* tty: Title escape sequence is only used on pts. tty do not support them, leading to a garbled prompt.
* same functionality without using PROMPT_COMMAND. Now it's available for other purpose.