s. keeling wrote: > Another common practice is to set PS1 in .bash_profile, then call > .bashrc from .bash_profile. > if [ ! -z "$PS1" ]; then
The PS1 is set by default for interactive shells and not set for non-interactive shells. So the test for $PS1 works without needing to set it. This is in the default Debian /etc/skel/.bashrc too. > The intent being to not clutter up the environment any more than is > necessary. Note: Some versions of bash read the .bashrc when it determines that it is started over a remote shell. By splitting the .bashrc into an interactive and non-interactive section then aliases can be loaded over a remote shell and made available to the command while not breaking things for a non-interactive environment. Not that I would advocate doing that. The feature was removed from the bash upstream due to various problems. Debian Etch has patches specifically for this situation. See /usr/share/doc/bash/README.Debian.gz . Bob
signature.asc
Description: Digital signature