Christoph Berg wrote:
> The problem that one doesn't want things like .bash_completion read
> there is easily solved by
> 
>       # check whether we run interactively
>       [ "$PS1" ] || return
> 
> (Something like that exists in Debian's /etc/skel/.bash_profile.)

Uh, no.  You are thinking of /etc/skel/.bashrc which does that.  The
profile sources the bashrc unconditionally.

> So test for reading ~/.bashrc should be done first in X startup files,
> only reading ~/{.bash_,}profile if the former doesn't exist.

Bash already automatically loads up the bashrc file if it is not a
login shell.  Loading bashrc is not the problem.  It is loading up
functionality which traditionally exists in the profile which is the
problem.

BTW, I see a lot of people turn their terminals into login shells with
'xterm -ls' and the like in order to make every shell a login shell
and source their profiles.  Which I think is a less than optimal
configuration and I avoid that myself.

Bob

Attachment: pgpMenSL60IBd.pgp
Description: PGP signature

Reply via email to