Unset the TERMCAP environment variable before checking whether we have a particular...
authorIain Patterson <me@iain.cx>
Tue, 5 Aug 2008 13:40:17 +0000 (13:40 +0000)
committerIain Patterson <me@iain.cx>
Tue, 5 Aug 2008 13:40:17 +0000 (13:40 +0000)
git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@120 6be0d1a5-5cfe-0310-89b6-964be062b18b

has_term

index 8150269..52005c1 100755 (executable)
--- a/has_term
+++ b/has_term
@@ -1,7 +1,5 @@
 #!/usr/bin/perl
 #
-# $Id$
-#
 # has_term: Check for a valid TERM value.
 # Usage: has_term [<term>]
 # Exits: 0 if the TERM setting is valid.
@@ -14,5 +12,7 @@ use Term::Cap;
 # Quit.
 close STDERR;
 
+# Don't be fooled by screen.
+delete $ENV{TERMCAP};
 Tgetent Term::Cap { TERM => $ARGV[0], OSPEED => 9600 } and exit 0;
 exit 100;