From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25169 invoked from network); 6 Apr 2001 18:40:39 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Apr 2001 18:40:39 -0000 Received: (qmail 23314 invoked by alias); 6 Apr 2001 18:40:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13920 Received: (qmail 23301 invoked from network); 6 Apr 2001 18:40:33 -0000 From: "Bart Schaefer" Message-Id: <1010406183939.ZM14729@candle.brasslantern.com> Date: Fri, 6 Apr 2001 18:39:39 +0000 In-Reply-To: <20010405095812.A18353@dman.com> Comments: In reply to Clint Adams "Re: zsh/termcap and zsh/terminfo modules" (Apr 5, 9:58am) References: <1010405001506.ZM644@candle.brasslantern.com> <001801c0bd94$16f37f80$21c9ca95@mow.siemens.ru> <20010405095812.A18353@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: zsh/termcap and zsh/terminfo modules MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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