* Matching control problem with space as pivot
@ 2001-07-22 20:36 Felix Rosencrantz
2001-07-24 7:19 ` Sven Wischnowsky
0 siblings, 1 reply; 2+ messages in thread
From: Felix Rosencrantz @ 2001-07-22 20:36 UTC (permalink / raw)
To: zsh-workers
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?
Thanks.
-FR.
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Matching control problem with space as pivot
2001-07-22 20:36 Matching control problem with space as pivot Felix Rosencrantz
@ 2001-07-24 7:19 ` Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 2001-07-24 7:19 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-07-24 7:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-22 20:36 Matching control problem with space as pivot Felix Rosencrantz
2001-07-24 7:19 ` Sven Wischnowsky
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).