home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / gnu / bash / bug / 755 < prev    next >
Encoding:
Internet Message Format  |  1993-01-25  |  1.6 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!tct.COM!chip
  2. From: chip@tct.COM (Chip Salzenberg)
  3. Newsgroups: gnu.bash.bug
  4. Subject: Re: always execute .bashrc
  5. Date: 25 Jan 1993 20:23:33 -0500
  6. Organization: GNUs Not Usenet
  7. Lines: 31
  8. Sender: daemon@cis.ohio-state.edu
  9. Approved: bug-bash@prep.ai.mit.edu
  10. Distribution: gnu
  11. Message-ID: <m0nFx9F-0000XBC@animal.tct.com>
  12. References: <9301231334.AB08895@bears.ece.ucsb.edu>
  13.  
  14. Quoting Brian Fox:
  15. > You are right, I do not see how that is a bug.  Vis a vis rsh and
  16. > desireable interactive behaviour, you cannot have your cake and eat it
  17. > too.
  18.  
  19. Of course!  It _is_ impossible for bash to decide whether it is run
  20. from rsh or not.
  21.  
  22. Therefore, I would suggest that rsh be configured or hacked to run
  23. something other than $SHELL -- $SHELL.rc perhaps.  So /bin/bash.rc
  24. would use a new "please run the .bashrc file" option:
  25.  
  26.    #!/bin/sh
  27.    SHELL=/bin/bash; export SHELL
  28.    exec /bin/bash -rc ${1+"$@"}
  29.  
  30. Failing the ability to hack rsh, I'd arrange for the above script to
  31. be the login `shell' of all bash users.  Therefore, login shells and
  32. rsh shells would always get .bashrc and no others would.
  33.  
  34. > > bsh -norc -c 'wc' < random.file
  35. > Your example is the one instance where "-c" is specified, the input
  36. > stream is not a tty, and, for some unspecified reason, you do not wish
  37. > to run .bashrc.
  38.  
  39. If consistency means nothing to you, then of course this inconsistency
  40. in your creation won't bother you.  I'm just glad I have source code.
  41. -- 
  42. Chip Salzenberg at Teltronics/TCT  <chip@tct.com>, <73717.366@compuserve.com>
  43.  
  44.