Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how does setopt -m work?
- X-seq: zsh-users 2211
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: Re: how does setopt -m work?
- Date: Thu, 11 Mar 1999 09:32:56 +0100 (MET)
- In-reply-to: mason@xxxxxxxxxxxxxxx's message of 11 Mar 1999 01:48:29 GMT
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
mason@xxxxxxxxxxxxxxx wrote:
> Sweth Chandramouli <sweth@xxxxxxxxxxxxxxxxxxxx> typed:
> : the subject pretty much says it all; what am i missing
> :here:
> :(astaroth/2)~: setopt -m "auto_r*"
> :(astaroth/3)~: setopt
> :interactive
> :monitor
> :norcs
> :shinstdin
> :zle
>
> It's probably a bug that it doesn't rip out the underscores when
> doing its matching. ``setopt -m "autor*"'' will work. The other
> thing to check would be case sensitivity.
Maybe, yes.
Bye
Sven
--- os/options.c Mon Mar 8 09:06:26 1999
+++ Src/options.c Thu Mar 11 09:29:20 1999
@@ -522,11 +522,20 @@
/* Globbing option (-m) set. */
while (*args) {
Comp com;
+ char *s, *t;
+
+ t = p = dupstring(*args);
+ while (*t)
+ if (*t == '_')
+ chuck(t);
+ else {
+ *t = tulower(*t);
+ t++;
+ }
/* Expand the current arg. */
- tokenize(*args);
- if (!(com = parsereg(*args))) {
- untokenize(*args);
+ tokenize(s);
+ if (!(com = parsereg(s))) {
zwarnnam(nam, "bad pattern: %s", *args, 0);
continue;
}
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author