OSSP CVS Repository

ossp - Check-in [4751]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4751
Date: 2004-Oct-22 21:16:53 (local)
2004-Oct-22 19:16:53 (UTC)
User:rse
Branch:
Comment: do not output escape sequences in batch mode
Tickets:
Inspections:
Files:
ossp-pkg/due/.due/due.cd.sh      1.1 -> 1.2     7 inserted, 5 deleted

ossp-pkg/due/.due/due.cd.sh 1.1 -> 1.2

--- due.cd.sh    2004/07/10 08:17:15     1.1
+++ due.cd.sh    2004/10/22 19:16:53     1.2
@@ -68,11 +68,13 @@
     PS1="\\u@\\h:$PWD\n\\\$ "
 
     #   adjust the X11 terminal window title with new $PWD (optional)
-    case "$TERM" in
-        xterm | xterm-* )
-            echo -n $'\e]0;'"$USER@$HOSTNAME:$PWD"$'\cg'
-            ;;
-    esac
+    if [ ".$BASH_INTERACTIVE" = .yes ]; then
+        case "$TERM" in
+            xterm | xterm-* )
+                echo -n $'\e]0;'"$USER@$HOSTNAME:$PWD"$'\cg'
+                ;;
+        esac
+    fi
 }
 
 #   initially adjust the environment

CVSTrac 2.0.1