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

Re: OT: Bash 3.0 Released



Peter wrote:
> - 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.

On the other hand, if it came from perl, it might make sense to copy
perl more accurately. Perl handles things like (0xab..0xde) and
(aa..zz) and even (Ab1..De2) sanely. This makes it somewhat less like
braceccl. If you try things like {A..z} in the new bash, you'll see
that it is trying to be like braceccl. Just not very well given that it
limits the choice of start and end characters.

Oliver



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