* FYI: BashDiff
@ 2007-10-03 5:34 Daniel Qarras
2007-10-03 15:34 ` Christopher Browne
2007-10-09 7:32 ` (alpha sequence missing in zsh) " Marc Chantreux
0 siblings, 2 replies; 7+ messages in thread
From: Daniel Qarras @ 2007-10-03 5:34 UTC (permalink / raw)
To: zsh-users
Hi,
just a FYI, there's a patch set for Bash that implements numerous new
features, many of them are already in Zsh and few are IMHO pointless
but a couple of them look pretty interesting to me. YMMV.
http://home.eol.ca/~parkw/index.html
Thanks.
____________________________________________________________________________________
Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: FYI: BashDiff
2007-10-03 5:34 FYI: BashDiff Daniel Qarras
@ 2007-10-03 15:34 ` Christopher Browne
2007-10-09 7:32 ` (alpha sequence missing in zsh) " Marc Chantreux
1 sibling, 0 replies; 7+ messages in thread
From: Christopher Browne @ 2007-10-03 15:34 UTC (permalink / raw)
To: Daniel Qarras; +Cc: zsh-users
On 10/3/07, Daniel Qarras <dqarras@yahoo.com> wrote:
> just a FYI, there's a patch set for Bash that implements numerous new
> features, many of them are already in Zsh and few are IMHO pointless
> but a couple of them look pretty interesting to me. YMMV.
>
> http://home.eol.ca/~parkw/index.html
I know William quite well; he did a couple of talks about this for our
Linux User Group here in Toronto, and we have both served on the Board
of Directors for the LUG...
http://gtalug.org/wiki/Meetings:2004-09
He started the effort by seeing features in Perl that he'd rather use in Bash.
He found it somewhat frustrating that the Bash developers were
reluctant to accept any of his changes.
Some of the control structures seemed pretty dubious to me, but it
seems good to me that he is trying to do some substantive
improvements.
--
http://linuxfinances.info/info/linuxdistributions.html
"... memory leaks are quite acceptable in many applications ..."
(Bjarne Stroustrup, The Design and Evolution of C++, page 220)
^ permalink raw reply [flat|nested] 7+ messages in thread
* (alpha sequence missing in zsh) Re: FYI: BashDiff
2007-10-03 5:34 FYI: BashDiff Daniel Qarras
2007-10-03 15:34 ` Christopher Browne
@ 2007-10-09 7:32 ` Marc Chantreux
2007-10-09 7:44 ` Stephane Chazelas
1 sibling, 1 reply; 7+ messages in thread
From: Marc Chantreux @ 2007-10-09 7:32 UTC (permalink / raw)
To: Daniel Qarras; +Cc: zsh-users
> just a FYI, there's a patch set for Bash that implements numerous new
> features, many of them are already in Zsh
It reminds me that i found a usefull feature in bash that is missing in
zsh: {a..z} to gen an alpha sequence.
regards
marc
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (alpha sequence missing in zsh) Re: FYI: BashDiff
2007-10-09 7:32 ` (alpha sequence missing in zsh) " Marc Chantreux
@ 2007-10-09 7:44 ` Stephane Chazelas
2007-10-09 8:16 ` Marc Chantreux
2007-10-09 8:29 ` Zvi Har'El
0 siblings, 2 replies; 7+ messages in thread
From: Stephane Chazelas @ 2007-10-09 7:44 UTC (permalink / raw)
To: Marc Chantreux; +Cc: Daniel Qarras, zsh-users
On Tue, Oct 09, 2007 at 09:32:40AM +0200, Marc Chantreux wrote:
>
>> just a FYI, there's a patch set for Bash that implements numerous new
>> features, many of them are already in Zsh
>
> It reminds me that i found a usefull feature in bash that is missing in
> zsh: {a..z} to gen an alpha sequence.
[...]
~$ setopt braceccl
~$ echo {a-z}
a b c d e f g h i j k l m n o p q r s t u v w x y z
--
Stéphane
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (alpha sequence missing in zsh) Re: FYI: BashDiff
2007-10-09 7:44 ` Stephane Chazelas
@ 2007-10-09 8:16 ` Marc Chantreux
2007-10-09 8:29 ` Zvi Har'El
1 sibling, 0 replies; 7+ messages in thread
From: Marc Chantreux @ 2007-10-09 8:16 UTC (permalink / raw)
To: Marc Chantreux, zsh-users
Stephane Chazelas a écrit :
> ~$ setopt braceccl
> ~$ echo {a-z}
> a b c d e f g h i j k l m n o p q r s t u v w x y z
wow ! thanks :)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (alpha sequence missing in zsh) Re: FYI: BashDiff
2007-10-09 7:44 ` Stephane Chazelas
2007-10-09 8:16 ` Marc Chantreux
@ 2007-10-09 8:29 ` Zvi Har'El
2007-10-09 8:59 ` Peter Stephenson
1 sibling, 1 reply; 7+ messages in thread
From: Zvi Har'El @ 2007-10-09 8:29 UTC (permalink / raw)
To: Marc Chantreux, Daniel Qarras, zsh-users
[-- Attachment #1: Type: text/plain, Size: 1824 bytes --]
I wondered why the diffence betwen the {1..9} and {a-z} syntax, and read
the BRACE EXPANSION section in zshexpn(1). It says
An expression of the form ‘{n1..n2}’, where n1 and n2 are integers, is
expanded to every number between n1 and n2 inclusive. If either
num‐
ber begins with a zero, all the resulting numbers will be padded
with
leading zeroes to that minimum width. If the numbers are in
decreas‐
ing order the resulting sequence will also be in decreasing order.
If a brace expression matches none of the above forms, it is
left
unchanged, unless the BRACE_CCL option is set. In that case,
it is
expanded to a sorted list of the individual characters
between the
braces, in the manner of a search set. ‘−’ is treated specially
as in
a search set, but ‘^’ or ‘!’ as the first character is treated
nor‐
mally.
I wonder: What is a "search set"? I couldn't find it anywhere in zshall(1).
On 09/10/07 09:44, Stephane Chazelas wrote:
> On Tue, Oct 09, 2007 at 09:32:40AM +0200, Marc Chantreux wrote:
>
>>> just a FYI, there's a patch set for Bash that implements numerous new
>>> features, many of them are already in Zsh
>>>
>> It reminds me that i found a usefull feature in bash that is missing in
>> zsh: {a..z} to gen an alpha sequence.
>>
> [...]
>
> ~$ setopt braceccl
> ~$ echo {a-z}
> a b c d e f g h i j k l m n o p q r s t u v w x y z
>
>
--
Dr. Zvi Har'El mailto:rl@math.technion.ac.il Department of Mathematics
tel:+972-54-4227607 Technion - Israel Institute of Technology
fax:+972-4-8293388 http://www.math.technion.ac.il/~rl/ Haifa 32000, ISRAEL
"If you can't say somethin' nice, don't say nothin' at all." -- Thumper (1942)
[-- Attachment #2: Type: text/html, Size: 3094 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (alpha sequence missing in zsh) Re: FYI: BashDiff
2007-10-09 8:29 ` Zvi Har'El
@ 2007-10-09 8:59 ` Peter Stephenson
0 siblings, 0 replies; 7+ messages in thread
From: Peter Stephenson @ 2007-10-09 8:59 UTC (permalink / raw)
To: Zvi Har'El; +Cc: Marc Chantreux, Daniel Qarras, zsh-users
On Tue, 09 Oct 2007 10:29:24 +0200
"Zvi Har'El" <rl@math.technion.ac.il> wrote:
> I wondered why the diffence betwen the {1..9} and {a-z} syntax, and read
> the BRACE EXPANSION section in zshexpn(1).
The difference in syntax is historical. The BRACE_CCL form came earlier,
out of zsh prehistory. I wanted to add a numeric form that didn't depend
on BRACE_CCL and borrowed the syntax for that from Perl since it didn't
look like an expression you'd have by accident.
> I wonder: What is a "search set"? I couldn't find it anywhere in zshall(1).
It simply means a [...] pattern expression. This bit isn't very helpful.
I note multibyte characters aren't handled. That probably isn't much of an
issue for X-Y but you might want to be able to use individual ones. That
looks like it would be a little work.
Index: Doc/Zsh/expn.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v
retrieving revision 1.81
diff -u -r1.81 expn.yo
--- Doc/Zsh/expn.yo 22 Aug 2007 10:46:42 -0000 1.81
+++ Doc/Zsh/expn.yo 9 Oct 2007 08:51:55 -0000
@@ -1229,12 +1229,17 @@
resulting sequence will also be in decreasing order.
If a brace expression matches none of the above forms, it is left
-unchanged, unless the tt(BRACE_CCL) option is set.
+unchanged, unless the option tt(BRACE_CCL) (an abbreviation for `brace
+character class') is set.
pindex(BRACE_CCL, use of)
-In that case, it is expanded to a sorted list of the individual
-characters between the braces, in the manner of a search set.
-`tt(-)' is treated specially as in a search set, but `tt(^)' or `tt(!)' as
-the first character is treated normally.
+In that case, it is expanded to a list of the individual
+characters between the braces sorted into the order of the characters
+in the ASCII character set (multibyte characters are not currently
+handled). The syntax is similar to a
+tt([)...tt(]) expression in filename generation:
+`tt(-)' is treated specially to denote a range of characters, but `tt(^)' or
+`tt(!)' as the first character is treated normally. For example,
+`tt({abcdef0-9})' expands to 16 words tt(0 1 2 3 4 5 6 7 8 9 a b c d e f).
Note that brace expansion is not part of filename generation (globbing); an
expression such as tt(*/{foo,bar}) is split into two separate words
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-10-09 9:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-03 5:34 FYI: BashDiff Daniel Qarras
2007-10-03 15:34 ` Christopher Browne
2007-10-09 7:32 ` (alpha sequence missing in zsh) " Marc Chantreux
2007-10-09 7:44 ` Stephane Chazelas
2007-10-09 8:16 ` Marc Chantreux
2007-10-09 8:29 ` Zvi Har'El
2007-10-09 8:59 ` Peter Stephenson
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).