3 # termsupported function
4 # Define a useful function to determine if the current value of TERM
5 # is useful, or if it needs changing. Used below.
8 # terminfo should have a file for this terminal type.
9 if [[ -f "/usr/share/terminfo/$TERM[1]/$TERM" ]]
11 # If it's there, success.
14 # With termcap, we have a monolithic terminal type listing.
15 if [[ -f /etc/termcap ]]
17 # This sed script joins continued \
18 # lines and then checks to see if this terminal name is listed.
23 -e 's/^\\([^:\\\\]*\\)[:\\\\].*\$/|\\1|/' \
31 < /etc/termcap`" = "" ]]
33 # Nothing matches, fail.
36 # Found a matching entry, succeed.
40 # If neither terminal capabilities system was found, fail.