]> git.pld-linux.org Git - packages/bash.git/commitdiff
- skip bashrc processing very early for non-interactive shells
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 30 Dec 2005 00:34:02 +0000 (00:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bashrc -> 1.29

bashrc

diff --git a/bashrc b/bashrc
index 3429dc16bb6c34d195a24bdae00f7df05e2c1d3d..d6a2ecc63f404bc5401e5a198bafcece54ab9ad8 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -3,6 +3,14 @@
 # System wide functions and aliases
 # Environment stuff goes in /etc/profile
 
+# Test for an interactive shell.  There is no need to set anything
+# past this point for scp and rcp, and it's important to refrain from
+# outputting anything in those cases.
+if [[ $- != *i* ]] ; then
+       # Shell is non-interactive.  Be done now!
+       return
+fi
+
 # If this is an xterm set the title to user@host:dir
 case $TERM in
        gnome|nxterm|xterm*|rxvt*)
This page took 0.036157 seconds and 4 git commands to generate.