Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (alpha sequence missing in zsh) Re: FYI: BashDiff



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@xxxxxxxxxxxxxxxxxxx    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)


Messages sorted by: Reverse Date, Date, Thread, Author