Customize Apple Terminal's Title Bar and Prompt

I like to show my username, computer name, and current path in my Terminal's prompt. But, it would also be nice to show it in the title bar.

Just add this line (or replace it if you already have one) in your ~/.bash_profile file.

export PS1='\u@\h:\w\$ \033]2;${USER}@$(hostname):${PWD}\007'


This will make your Terminal window look something like this:

Picture 1


If you want to be really hard core, you can customize your tabs too.

Use this: Show remote host names as tab titles in Terminal.

Basically, you create hard links to the ssh binary with the name of the remote host as the name of the hard link. And, since Terminal displays "ssh" in the tab, you can get Terminal to display the hard link's name instead. Makes sense to me. But, I don't need it.


About this entry


0 comments: