From: P.Stephenson@swansea.ac.uk
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: glob.c with comments
Date: Thu, 15 Jun 95 09:53:40 +0100 [thread overview]
Message-ID: <18869.9506150853@pyro.swan.ac.uk> (raw)
In-Reply-To: "P.Stephenson@swansea.ac.uk"'s message of "Wed, 14 Jun 95 16:59:01 BST." <26244.9506141559@pyro.swan.ac.uk>
P.Stephenson@swansea.ac.uk wrote:
> One thing I noticed is that the code that handled {a-z} doesn't check
> for commas before or after the dash, so
>
> % print -c foo{,-A}
> foo, foo. foo0 foo2 foo4 foo6 foo8 foo: foo< foo> foo@
> foo- foo/ foo1 foo3 foo5 foo7 foo9 foo; foo= foo? fooA
I had a request to fix this. Here's a diff against the new glob.c I
posted.
(I just replied to myself instead of the list. I'm not getting used
to this very quickly.)
*** Src/glob.c~ Wed Jun 14 16:18:42 1995
--- Src/glob.c Thu Jun 15 09:50:15 1995
***************
*** 1011,1020 ****
*np = nextnode(last);
return;
}
! if (str[2] == '-' && str[3] && str[4] == Outbrace) { /* {a-z} */
/* Now any other ranges present: note this only happens
! * for a pattern like {<char>-<char>}, but it happens for ANY
! * character <char>, so {,-z} does this (possibly a bug).
*/
char c1, c2;
--- 1011,1021 ----
*np = nextnode(last);
return;
}
! if (str[2] == '-' && str[3] && str[4] == Outbrace
! && str[1] != Comma && str[3] != Comma) { /* {a-z} */
/* Now any other ranges present: note this only happens
! * for a pattern like {<char1>-<char2>}. <charN> should not
! * be a tokenised comma.
*/
char c1, c2;
--
Peter Stephenson <P.Stephenson@swansea.ac.uk> Tel: +44 1792 205678 extn. 4461
WWW: http://python.swan.ac.uk/~pypeters/ Fax: +44 1792 295324
Department of Physics, University of Wales, Swansea,
Singleton Park, Swansea, SA2 8PP, U.K.
prev parent reply other threads:[~1995-06-15 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-06-14 15:59 P.Stephenson
1995-06-15 8:53 ` P.Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18869.9506150853@pyro.swan.ac.uk \
--to=p.stephenson@swansea.ac.uk \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).