Thursday, December 31, 2009

bash: current working directory in title bar

Add this to your ".bashrc",

export PS1="\[\e]2;\u@\h \w\a\e[32;1m\]>\[\e[0m\] "

The next time you login, it should display your username, hostname and current working directory on the title bar of the shell prompt. It also replaces the default prompt with a nice green arrow. Sweet and compact !

If found this tip and more here,

Thanks Daniel !!

No comments:

Post a Comment