home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!prg.ox.ac.UK!Mark.Bush
- From: Mark.Bush@prg.ox.ac.UK (Mark Bush)
- Newsgroups: gnu.bash.bug
- Subject: Re: always execute .bashrc
- Date: 25 Jan 1993 20:57:57 -0500
- Organization: Oxford University Computing Laboratory
- Lines: 23
- Sender: daemon@cis.ohio-state.edu
- Approved: bug-bash@prep.ai.mit.edu
- Distribution: gnu
- Message-ID: <1993Jan25.115536.5935@thom5.ecs.ox.ac.uk>
- References: <9301141412.AA15219.SM@odin.INS.CWRU.Edu>
-
- In article <m0nFPhi-0000XBC@animal.tct.com> chip@tct.COM (Chip Salzenberg) writes:
- #In an earlier message to bug-bash, I wrote:
- #> Chet understates the problem. Bash runs .bashrc when you do this:
- #> bash -c 'wc' < random.file
- #> Everyone (except Chet and Brian, it seems) can see that's a bug.
- #
- #My statement implies that Chet approves of the bug. However, he does
- #NOT approve. Rather, he has agreed with me on several occasions that
- #the behavior in question should be changed.
-
- Not everyone thinks this is a bug! What is wrong with the shell trying to
- source .bashrc on *every* invocation (with login shell being the only
- exception)? If you specifically don't want it to read the startup file, add
- a -norc flag. If you have stuff in .bashrc which you specifically don't
- want read, protect it with an `if' checking the value of PS1.
-
- If bash works in this way, then *everyone* can get the behaviour they want
- with minimum fuss. Otherwise, how does someone who wants to make use of
- their aliases and such within the environments that bash normally doesn't
- source the .bashrc?
-
- Mark
-
-