SOURCES: bash-skel-.bashrc - skip aliases, etc for non-interactive...

glen glen at pld-linux.org
Wed Nov 14 01:39:05 CET 2007


Author: glen                         Date: Wed Nov 14 00:39:05 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- skip aliases, etc for non-interactive shells

---- Files affected:
SOURCES:
   bash-skel-.bashrc (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/bash-skel-.bashrc
diff -u SOURCES/bash-skel-.bashrc:1.2 SOURCES/bash-skel-.bashrc:1.3
--- SOURCES/bash-skel-.bashrc:1.2	Thu Dec 14 13:47:09 2000
+++ SOURCES/bash-skel-.bashrc	Wed Nov 14 01:39:00 2007
@@ -4,4 +4,9 @@
 	. /etc/bashrc
 fi
 
+# return if the shell is not interactive (called from scp, etc)
+if [[ $- != *i* ]]; then
+	return
+fi
+
 # Put your local aliases here
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/bash-skel-.bashrc?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list