[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where is Bash Prompt Set??

On Monday 08 February 2010 17:21:38 Scott wrote:
> Hi, I'm new to debian, but not to linux. (experimenting with lenny...)
> This is the question I asked myself while seeing various prompts after
> I thought I had customised them. Near as I can tell, there are three
> different scripts which fiddle with the default bash prompt:
>   /etc/profile
>   /etc/bashrc
>   ~/.bashrc

You forgot ~/.bash_profile.  It is recommended that ~/.bash_profile source 
~/.bashrc, but it is not required.

>       {why is root's .bashrc read twice? Why no leading - on original
>       root prompt? Why does /etc/profile get sourced for root but not
>       for user?}

PS1 is normally exported I think, and .bashrc might be read by a subshell.  
For example, a process tree like:

Might send up reading ~/.bashrc twice.
Boyd Stephen Smith Jr.           	 ,= ,-_-. =.
bss@iguanasuicide.net            	((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy 	 `-'(. .)`-'
http://iguanasuicide.net/        	     \_/

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply to: