Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: Re: Seg fault in matcher-list matching



Tanaka Akira wrote:

> In article <200005150926.LAA17371@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
>   Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx> writes:
> 
> > I couldn't get it to seg-fault, but there was something broken. Matching 
> > of the suffix, for example, and that both in C and shell code.
> 
> I found another problem about matching control.
> 
> Z(4):akr@serein% Src/zsh -f
> serein% bindkey -e; autoload -U compinit; compinit -D; compdef _tst tst
> serein% _tst () { compadd -M 'r:|[:.]=* r:|=*' a.b:0 c.d:1 }
> serein% tst :<TAB>
> 
> This inserts nothing now.
> 
> But 3.1.7-pre-2 inserts `.' as follows (and place the cursor on the
> `.').
> 
> % tst .:

The new behaviour is the correct one: with `*', the `*' must not match 
anchors and that's what it does now (it would have to match the `.',
of course). With `**' you get the old behaviour, which is correct, too.

;-)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author