From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4851 invoked from network); 13 Jan 1998 01:53:25 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 13 Jan 1998 01:53:25 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id UAA19165; Mon, 12 Jan 1998 20:38:55 -0500 (EST) Resent-Date: Mon, 12 Jan 1998 20:38:28 -0500 (EST) Message-ID: <19980113013955.24269@thelonious.new.ox.ac.uk> Date: Tue, 13 Jan 1998 01:39:55 +0000 From: Adam Spiers To: zsh users mailing list Subject: Re: Exporting arrays Reply-To: Adam Spiers References: <34BA1F3D.18EE4BAB@rrz.uni-hamburg.de> <199801121515.PAA11821@taos.demon.co.uk> <19980112221212.47183@thelonious.new.ox.ac.uk> <82soqtgu71.fsf@cuckoo.infovav.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84 In-Reply-To: <82soqtgu71.fsf@cuckoo.infovav.se>; from Mirar on Tue, Jan 13, 1998 at 12:15:46AM +0100 Resent-Message-ID: <"qQ71Q2.0.1h4.KMikq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1225 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Mirar (mirar@idonex.se) wrote: > > Is that glob patterns also, or something else? I ask, because I > > can't get it working. I want a condition like C[0,abcd????] > > I got this line to work, at least: > > compctl -k '(foobar)' -x C[-1,foo???] -k '(foo bar)' - -- foo That provided enough of a clue for me to realise what I was doing wrong :-) Essentially I wanted it to add a suffix if the prefix matched foo???? but had forgotten that the prefix was counted as part of the completion and so any valid completions would have to begin with this prefix. Hence I needed a dummy completion which always completed successfully by adding an empty string, and found one in -K compctl_dummy, where compctl_dummy () { reply=($1) } Is there a better way of doing this? Should there not be the flexibility of choosing whether or not a specified string or pattern to match is part of the completion?