Changes between Initial Version and Version 1 of Ticket #40603, comment 3
- Timestamp:
- Oct 12, 2013, 6:29:52 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #40603, comment 3
initial v1 13 13 > distribution does it. 14 14 15 I assume you're referring to this comment by Chet Ramey[ 1]:15 I assume you're referring to this comment by Chet Ramey[#ref1 (1)]: 16 16 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 -c21 > 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. 24 24 25 25 Chet's criticism is valid. Adding special-case knowledge of SSH into the shell … … 32 32 33 33 Right 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 more34 big mess[#ref2 (2)]. SSH_SOURCE_BASHRC is quite clean, in comparison, and much more 35 35 flexible. 36 36 … … 47 47 At the moment, using MacPorts bash as my login shell breaks `git pull my-mac:~/path/to/repo`. 48 48 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