X-Git-Url: http://git.iain.cx/?p=profile.git;a=blobdiff_plain;f=has_term;fp=has_term;h=8150269eee53396b6e9fc4dcd32decca77b8fcab;hp=0000000000000000000000000000000000000000;hb=104b025d33b8cf5f9d42bda3ac3d158eb7a07701;hpb=bcde0b33db971e047dcbcc241669d622b15fc5af diff --git a/has_term b/has_term new file mode 100755 index 0000000..8150269 --- /dev/null +++ b/has_term @@ -0,0 +1,18 @@ +#!/usr/bin/perl +# +# $Id$ +# +# has_term: Check for a valid TERM value. +# Usage: has_term [] +# Exits: 0 if the TERM setting is valid. +# 1 otherwise. +# Example: has_term dtterm +# + +use Term::Cap; + +# Quit. +close STDERR; + +Tgetent Term::Cap { TERM => $ARGV[0], OSPEED => 9600 } and exit 0; +exit 100;