Thursday, February 09, 2006

Mac X: Changing bash prompt in X11's xterm

Default bash prompt in my X11's xterm was:PS1="\h:\w \u"This was very annoying as the prompt contained all the path to the current directory, which was especially bed if I went dip into the directory tree. In such a case it is better to use '\W' option instead of '\w', as this option shows only current directory name, and not full path to it. To change bash prompt use:export PS1="\h:\W \u$ "To make it permanent just add this line to ~/.bashrc.

No comments:

Post a Comment