Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh/termcap and zsh/terminfo modules
- X-seq: zsh-workers 13920
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: zsh/termcap and zsh/terminfo modules
- Date: Fri, 6 Apr 2001 18:39:39 +0000
- In-reply-to: <20010405095812.A18353@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <1010405001506.ZM644@xxxxxxxxxxxxxxxxxxxxxxx> <001801c0bd94$16f37f80$21c9ca95@xxxxxxxxxxxxxx> <20010405095812.A18353@xxxxxxxx>
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