From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16518 invoked from network); 17 Sep 1999 09:37:43 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Sep 1999 09:37:43 -0000 Received: (qmail 12543 invoked by alias); 17 Sep 1999 09:37:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7904 Received: (qmail 12428 invoked from network); 17 Sep 1999 09:35:59 -0000 Message-ID: <37E20B6E.EB76FC79@u.genie.co.uk> Date: Fri, 17 Sep 1999 10:35:42 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.61 [en] (Win95; I) X-Accept-Language: en MIME-Version: 1.0 To: zsh-workers@sunsite.auc.dk Subject: Re: _man only uses $manpath References: <199909170723.JAA01955@beta.informatik.hu-berlin.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sven Wischnowsky wrote: > Andrej Borsenkow wrote: > > On Thu, 16 Sep 1999, Adam Spiers wrote: > > > Sounds like we need some way of intelligently figuring out a solution > > > for both scenarios. Does `man -w' return an error of some sort on > > > your system which we could test for? > > Well, exit code != 0. I have no idea, how reliable it is (different > > versions etc) > > Same here for Digital Unix. Maybe we should test $OSTYPE? The only man I can find which does support -w or --path is the GNU one. The exit code of != 0 seems fine on the systems I've looked at provided stderr is redirected. What are you trying to achieve with man -w - find a default manpath to use if $manpath is unset? As far as I can tell man -w only gives you the location of a specific man page which isn't entirely useful for finding a default manpath as the default can (and often will) contain more than one directory. The only way I know of finding the default manpath is by running the man binary through strings. Maybe we could use a for loop to guess possible man directories and check them. Oliver Kiddle