From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8649 invoked from network); 9 Nov 1999 19:15:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Nov 1999 19:15:05 -0000 Received: (qmail 28602 invoked by alias); 9 Nov 1999 19:14:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8606 Received: (qmail 28595 invoked from network); 9 Nov 1999 19:14:54 -0000 From: "Bart Schaefer" Message-Id: <991109191417.ZM14847@candle.brasslantern.com> Date: Tue, 9 Nov 1999 19:14:17 +0000 In-Reply-To: <991109175948.ZM14769@candle.brasslantern.com> Comments: In reply to "Bart Schaefer" "Re: completion grouping (yes, again)" (Nov 9, 5:59pm) References: <199911091207.NAA21115@beta.informatik.hu-berlin.de> <991109175948.ZM14769@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Re: completion grouping (yes, again) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 9, 5:59pm, Bart Schaefer wrote: } Subject: Re: completion grouping (yes, again) } } This is great stuff, Sven. I don't have any real opinion at this point } about which is better. I would suggest a couple of changes: One other thing I forgot to mention: I'd like it better if these functions read from stdin/file rather than taking everything as command-line args. Here-strings could be used for simple cases. I wanted to do this with _arg_compile, but didn't get around to it. The difficulty is that the `read' builtin doesn't know from quoting, so it isn't obvious how to come up with a representation for patterns containing spaces (etc.) that could be unambiguously consumed without forking. Of course, one could make two versions of each function: One that takes command-line args, one that takes stdin, and then do something like conf1_takes_stdin() { eval conf1_takes_args $(cat $1) } but that forks off a really-should-be-unnecessary "cat". Or conf1_takes_stdin() { local text=conf1_takes_args line while read line; do text="$text $line"; done eval $text } but that's slow and does a lot of realloc-ing. It's just that I don't like having to write what looks like semi-structured text with backslashes at the end of every line. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com