From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2552 invoked from network); 26 Feb 1999 05:38:15 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Feb 1999 05:38:15 -0000 Received: (qmail 20314 invoked by alias); 26 Feb 1999 05:37:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5535 Received: (qmail 20306 invoked from network); 26 Feb 1999 05:37:46 -0000 X-Authentication-Warning: awayteam.zanshin.com: schaefer set sender to schaefer@tiny.zanshin.com using -f From: Bart Schaefer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14038.12998.131387.671968@c-bart.amazon.com> Date: Thu, 25 Feb 1999 21:36:06 -0800 (PST) To: Sven Wischnowsky Cc: zsh-workers@sunsite.auc.dk Subject: Re: completion test suggestion In-Reply-To: <199902240929.KAA26162@beta.informatik.hu-berlin.de> References: <199902240929.KAA26162@beta.informatik.hu-berlin.de> X-Mailer: VM 6.65a under Emacs 20.3.5.1 Reply-To: Bart Schaefer 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. 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. I guess I could live with this if we can't come up with anything better, but I'd still like to try to come up with something better.