1

.profile script problem

view story
linux-howto

http://www.unix.com – I am using MacOSX, and I decided to change the way my terminal looks. So, I created a ~/.profile file that has only the line Code: export PS1="\[\e[1;33m\]\u\[\e[0m\] @ \[\e[1;35m\]\W \[\e[0m\]($0) \[\e[1;31m\]\$ \[\e[0m\]" ( '\u' displays the current user '\W' displays the Working dir and the weird numbers are colors) It works fine when I log in the Terminal, which is bash, but when I 'su', which is sh, $0 is still equal to: '-bash' instead of 'sh'. \u and \W change to the correct ones but $0 does not. When I run '. .profile' inside the shell it gets fixed. How (HowTos)