From 4f59104fc52c2d2a093719c422d2bcd441232f7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Fri, 30 Dec 2005 00:34:02 +0000 Subject: [PATCH] - skip bashrc processing very early for non-interactive shells Changed files: bashrc -> 1.29 --- bashrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bashrc b/bashrc index 3429dc1..d6a2ecc 100644 --- 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*) -- 2.44.0