Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Exporting arrays
- X-seq: zsh-users 1225
- From: Adam Spiers <adam@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh users mailing list <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: Exporting arrays
- Date: Tue, 13 Jan 1998 01:39:55 +0000
- In-reply-to: <82soqtgu71.fsf@xxxxxxxxxxxxxxxxx>; from Mirar on Tue, Jan 13, 1998 at 12:15:46AM +0100
- References: <34BA1F3D.18EE4BAB@xxxxxxxxxxxxxxxxxx> <199801121515.PAA11821@xxxxxxxxxxxxxxxx> <19980112221212.47183@xxxxxxxxxxxxxxxxxxxxxxx> <82soqtgu71.fsf@xxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam.spiers@xxxxxxxxxxxx>
Mirar (mirar@xxxxxxxxx) 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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author