Showing current folder in Terminal’s Title

This is a nice trick i’ve learnt not long ago. Nice, and useful. If you run OSX, and you’d like Terminal to display the current folder, in its title… to looks something like this:


All you need to do is to edit the .profile in your home directory, and type the following line:

[cc lang=”bash”]export PROMPT_COMMAND=’echo -ne “\033]0;[${PWD/$HOME/~}]\007″‘[/cc]

Nice, right?