]> git.pld-linux.org Git - packages/bash.git/commitdiff
- ~/.bashrc with /etc/bashrc shouldn't be even executed for non-interactive
authorTomasz Pala <gotar@pld-linux.org>
Thu, 25 Dec 2008 13:46:13 +0000 (13:46 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  shells, moved test from bottom lines of .bashrc to .bash_profile; test
  left in /etc/bashrc as we can't fix local configurations in home dirs

Changed files:
    bash-skel-.bash_profile -> 1.7
    bash-skel-.bashrc -> 1.4

bash-skel-.bash_profile
bash-skel-.bashrc

index 447dff1dc4b5bb037c6f0556155725f451566d53..7837e8d011c2c6f513a916528da778274429fd23 100644 (file)
@@ -1,6 +1,8 @@
 # .bash_profile - file executed when logging in
 
-if [ -f ~/.bashrc ]; then
+# execute local (and so system wide) rc file only when interactive (not from scp etc.)
+# bash is too dumb to do in on it's own when started as login shell
+if [ $- = *i* && -f ~/.bashrc ]; then
        . ~/.bashrc
 fi
 
@@ -12,6 +14,7 @@ export TMPDIR="$TMP"
 # setup LOCALE variables
 #export LANG=
 #export LC_ALL=
+#export LANGUAGE=
 
 # only You can access your files
 #umask 077
index 16709995cdb98b148b81dd6e57ced0c42ae4e152..0631e3f67f1e8446dec59ac7ff5d6abbb37d110a 100644 (file)
@@ -1,12 +1,7 @@
-# .bashrc - file executed when executing bash
+# .bashrc - startup file for bash as interactive shell
 
 if [ -f /etc/bashrc ]; then
        . /etc/bashrc
 fi
 
-# return if the shell is not interactive (called from scp, etc)
-if [[ $- != *i* ]]; then
-       return
-fi
-
-# Put your local aliases here
+# Put your local functions and aliases here
This page took 0.103966 seconds and 4 git commands to generate.