Changes between Initial Version and Version 1 of Ticket #40603, comment 3


Ignore:
Timestamp:
Oct 12, 2013, 6:29:52 PM (11 years ago)
Author:
dlitz@…
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #40603, comment 3

    initial v1  
    1313> distribution does it.
    1414
    15 I assume you're referring to this comment by Chet Ramey[1]:
     15I assume you're referring to this comment by Chet Ramey[#ref1 (1)]:
    1616
    17 > Here's the problem:  consider a user who runs a shell that doesn't understand
    18 > $SHLVL in the same way bash does (they do exist).  They ssh to a system with
    19 > bash modified with SSH_SOURCE_BASHRC enabled.  Every time they run,
    20 > explicitly (unlikely) or via some other agent (more likely), `bash -c
    21 > command', their .bashrc file, if it exists, will be read, as will the system
    22 > /etc/bashrc if that's been enabled.  This will lead to some really obscure
    23 > bug reports.  It's happened.
     17    Here's the problem:  consider a user who runs a shell that doesn't
     18    understand $SHLVL in the same way bash does (they do exist).  They ssh to a
     19    system with bash modified with SSH_SOURCE_BASHRC enabled.  Every time they
     20    run, explicitly (unlikely) or via some other agent (more likely), `bash -c
     21    command', their .bashrc file, if it exists, will be read, as will the
     22    system /etc/bashrc if that's been enabled.  This will lead to some really
     23    obscure bug reports.  It's happened.
    2424
    2525Chet's criticism is valid.  Adding special-case knowledge of SSH into the shell
     
    3232
    3333Right now, setting environment variables on OSX outside ~/.bashrc is a pretty
    34 big mess[2].  SSH_SOURCE_BASHRC is quite clean, in comparison, and much more
     34big mess[#ref2 (2)].  SSH_SOURCE_BASHRC is quite clean, in comparison, and much more
    3535flexible.
    3636
     
    4747At the moment, using MacPorts bash as my login shell breaks `git pull my-mac:~/path/to/repo`.
    4848
    49 [1] http://lists.gnu.org/archive/html/bug-bash/2007-12/msg00028.html
    50 [2] http://stackoverflow.com/questions/603785/environment-variables-in-mac-os-x/4567308#4567308
     49[=#ref1 (1)] http://lists.gnu.org/archive/html/bug-bash/2007-12/msg00028.html
     50
     51[=#ref2 (2)] http://stackoverflow.com/questions/603785/environment-variables-in-mac-os-x/4567308#4567308