From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17640 invoked from network); 19 Nov 1997 20:16:07 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 19 Nov 1997 20:16:07 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id OAA00054; Wed, 19 Nov 1997 14:44:11 -0500 (EST) Resent-Date: Wed, 19 Nov 1997 14:44:11 -0500 (EST) From: "Bart Schaefer" Message-Id: <971119114150.ZM1710@candle.brasslantern.com> Date: Wed, 19 Nov 1997 11:41:50 -0800 In-Reply-To: <199711191700.SAA08643@hydra.ifh.de> Comments: In reply to Peter Stephenson "PATCH: User-defined completion listing" (Nov 19, 6:00pm) References: <199711191700.SAA08643@hydra.ifh.de> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: User-defined completion listing MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"D9QOS.0.n.A6qSq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3623 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 19, 6:00pm, Peter Stephenson wrote: } Subject: PATCH: User-defined completion listing } } Now the good news: the syntax (see manual patch for more) is either } } compctl ... -Y '$array' } or } compctl ... -Y 'func' } } In the first case, $array is, err, an array, in the second, func is } called and must set $reply, just like a -K function. I must confess confusion as to why you'd do it this way. If you're going to examine the first character and behave differently when it is '$', you could do that with -X and not need a new option. If you're going to expand a variable, why does it have to be an array? The parameter to -X is just a string. If you're going to substitute a string, why pass it around with $reply? } Another thing under the `could perhaps be better, but it's time I did } some work' heading: literal arrays are allowed as with -k, i.e. -Y } '(option1 option2 ...)', but there's no way of getting a literal } string there. Why do you need to pass a literal string to -Y when you can use -X ? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com