diff rc/tcsh @ 241:443e0004a708

[tcsh] Ensures interactive terminal.
author Edho Arief <edho@myconan.net>
date Thu, 03 Nov 2011 15:41:03 +0700
parents a7484f2c9616
children 3167e31f8f01
line wrap: on
line diff
--- a/rc/tcsh	Sun Oct 02 07:24:37 2011 +0700
+++ b/rc/tcsh	Thu Nov 03 15:41:03 2011 +0700
@@ -1,4 +1,10 @@
 #!/usr/bin/env tcsh
+
+# Ensures this script is running on terminal. Otherwise exit immediately.
+if ( ! $?prompt ) then
+  exit
+endif
+
 [ -e "${HOME}/.ecos_tcsh.before" ] && source "${HOME}/.ecos_tcsh.before"
 umask 22
 limit coredumpsize 0