Update X terminal title

Your window title of an X terminal and the MacOS X Terminal.app title could be updated with hostname and path automatically.

Terminal.app

And it could be so simple, add the following line to your ~/.bashrc:

# Change the window title of X terminals
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"

An additional feature is provided by MacOS X Terminal.app by using right click on the title. It allow you to open the current folder or any above folder.

Posted

February 25, 2016, 12:12 pm

Tags

, , ,

More

Permalink

Comments

Send your comment by mail.