Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh/termcap and zsh/terminfo modules



It turns out that I actually don't have tigetstr on this machine.  The
build process compiles terminfo.o anyway, but then the config.modules
line causes linking to be skipped.

What caused me to notice was an attempt to write a function that would
report whether a terminal had automargin capability, regardless of which
of termcap or terminfo was available.  I didn't like getting "failed to
load module" from "zmodload -i zsh/terminfo"; yes, it can be redirected
away with 2>/dev/null, but that feels messy.

Can someone who has terminfo confirm that (( $+terminfo )) is a valid
test of whether the terminfo module is available?  Of course, zsh could
have been configured via config.modules to not autoload it ...

The other thought I had was to make both modules loadable, but simply
not do anything useful if the corresponding library wasn't available
(e.g. on my system "echoti ..." would always return nonzero, and the
$terminfo hash would be empty).  That makes (( $+terminfo )) useless.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



Messages sorted by: Reverse Date, Date, Thread, Author