From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5612 invoked from network); 26 Feb 1999 12:26:11 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Feb 1999 12:26:11 -0000 Received: (qmail 26315 invoked by alias); 26 Feb 1999 12:25:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5540 Received: (qmail 26308 invoked from network); 26 Feb 1999 12:25:55 -0000 Date: Fri, 26 Feb 1999 13:25:13 +0100 (MET) Message-Id: <199902261225.NAA31476@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Bart Schaefer's message of Thu, 25 Feb 1999 21:36:06 -0800 (PST) Subject: Re: completion test suggestion Bart Schaefer wrote: > Sven Wischnowsky writes: > > In mathematical environments you can use expressions like > > `foo(x,y)'. > > The problem that I have with this is that I don't know whether the value > of the function is its exit status or its standard output. To behave > like a unix tool (say, `expr`) you'd want to capture its output and use > that; but if it's a shell function it'd be much easier to capture its > exit status (no fork/read required). But then the truth/falsehood of > zero/nonzero exit status is reversed in math context, which is really > confusing. I thought about using the return value or the value of a parameter, the function sets (`REPLY'?). But we needn't allow shell functions here (or add this later). If we have only builtin (in the base or in modules) functions this isn't a problem. > The other difficulty is that you have to call the function twice (or > call two different functions) to produce the start and end values of a > range, if what you want is some slice of $words. Compared to a parameter expansion in a subscript this would still be faster, I think (if that is the problem you mean). Bye Sven -- Sven Wischnowsky wischnow@informatik.hu-berlin.de