Improve title of terminal and history search