From: Peter Stephenson <pws@csr.com>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Re: OT: Bash 3.0 Released
Date: Fri, 30 Jul 2004 14:16:57 +0100 [thread overview]
Message-ID: <200407301316.i6UDGw59021990@news01.csr.com> (raw)
In-Reply-To: "Oliver Kiddle"'s message of "Fri, 30 Jul 2004 14:24:24 +0200." <12365.1091190264@trentino.logica.co.uk>
Oliver Kiddle wrote:
> Stephane Chazelas wrote:
>
> > Interesting feature not in zsh (AFAIK) :
> >
> > {a..d} for {a,b,c,d}
>
> setopt braceccl
> echo {a-d}
>
> I'm not sure the bash syntax isn't better though...
Yes, it would be. This is all ancient history. Bart will no doubt
find some ancient email or change entry to contradict me, but it went
something like this:
- pfalstad original had just BRACE_CCL. The main reason this is an
option rather than default behaviour is you can also do {aeiou} to
generate any of the characters in the same way as {a,e,i,o,u}.
(Bart told me for the purpose of the book that BRACE_CCL stands
for `brace character classes', so it's deliberately similar to
the way [aeiou] works in pattern matching.)
- I added the {num1..num2} syntax, borrowed from Perl. Braces without
commas don't usually have any effect, so I wasn't too worried about
compatibility. But to be on the safe side I made sure it fitted
the form exactly.
- Bash borrowed {num1..num2}, although without the feature to pad
leading zeroes.
- They've obviously decided to extend this to characters in a consistent
way.
Borrowing it back is presumably not that hard, but I'm doubtful how
useful it would be. It's in the sort of area where no one is going
to expect much compatibility between shells.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************
next prev parent reply other threads:[~2004-07-30 13:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-29 15:46 Felix Rosencrantz
2004-07-29 16:09 ` DervishD
2004-07-30 11:59 ` Stephane Chazelas
2004-07-30 12:24 ` Oliver Kiddle
2004-07-30 12:39 ` Stephane Chazelas
2004-07-30 13:16 ` Peter Stephenson [this message]
2004-07-31 8:47 ` Bart Schaefer
2004-08-01 13:42 ` Oliver Kiddle
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=200407301316.i6UDGw59021990@news01.csr.com \
--to=pws@csr.com \
--cc=zsh-users@sunsite.dk \
/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).