From 7f832ee6841a8a174c55bba18d147cef9ddf471e Mon Sep 17 00:00:00 2001 From: Iain Patterson Date: Tue, 5 Aug 2008 13:40:17 +0000 Subject: [PATCH] Unset the TERMCAP environment variable before checking whether we have a particular term entry, as screen will set this variable and interfere with the results. git-svn-id: https://svn.cambridge.iain.cx/profile/trunk@120 6be0d1a5-5cfe-0310-89b6-964be062b18b --- has_term | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/has_term b/has_term index 8150269..52005c1 100755 --- 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 [] # 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; -- 2.20.1