Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how does setopt -m work?
- X-seq: zsh-users 2213
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: how does setopt -m work?
- Date: Thu, 11 Mar 1999 07:49:22 -0800 (PST)
- Cc: zsh-users@xxxxxxxxxxxxxx
- In-reply-to: <199903110832.JAA17980@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <199903110832.JAA17980@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Bart Schaefer <schaefer@xxxxxxxxxxx>
Sven Wischnowsky writes:
>
> > 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);
Is this really the whole patch? After applying this, I get
../../zsh-3.1.5/Src/options.c: In function `bin_setopt':
../../zsh-3.1.5/Src/options.c:527: `p' undeclared (first use this function)
../../zsh-3.1.5/Src/options.c:527: (Each undeclared identifier is reported only once
../../zsh-3.1.5/Src/options.c:527: for each function it appears in.)
../../zsh-3.1.5/Src/options.c:525: warning: `s' might be used uninitialized in this function
../../zsh-3.1.5/Src/options.c:525: warning: `t' might be used uninitialized in this function
> + 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;
> }
Messages sorted by:
Reverse Date,
Date,
Thread,
Author