Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Matching control problem with space as pivot
- X-seq: zsh-workers 15469
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Matching control problem with space as pivot
- Date: Tue, 24 Jul 2001 09:19:16 +0200 (MET DST)
- In-reply-to: <20010722203635.63486.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Felix Rosencrantz wrote:
> There might be a problem with trying to use space as a pivot point with
> matching control.
>
> host% bindkey -e; autoload -U compinit; compinit -D
> host% zstyle ':completion:*:complete:*' matcher-list 'r:|[.,_- ]=**'
> host% touch "abc.def" "abc ghi" "axx gxx" "ayy.gyy"
> host% more a\ g<TAB>
> <nothing.>
> host% more a.<TAB>
> abc.def ayy.gyy
> host% more a\.<TAB>
> abc.def ayy.gyy
>
> I thought maybe the backslash was causing a problem. I also
> tried using 'r:|[.,_-\ ]=**', which didn't help. Is this a bug?
> Or user error?
1. Yes, you need the backslash there.
2. You didn't tell it that it can insert characters at the end (`r:|=*').
3. Look at your character class. Closely.
[.,_-\ ]
That's `a dot, a comma or one of the characters between an underscore
and a space'. Since the space is ASCII-wise before the underscore
that's the same as `a dot or a comma'.
You might want to try 'r:|[.,\ _-]=** r:|=*'.
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author