From: Iain Patterson Date: Tue, 5 Aug 2008 13:40:17 +0000 (+0000) Subject: Unset the TERMCAP environment variable before checking whether we have a particular... X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=7f832ee6841a8a174c55bba18d147cef9ddf471e;p=profile.git 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 --- 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;