Discussion:
Rational Range Interpretation for bash-5.0?
Chet Ramey
2018-08-06 20:07:52 UTC
Permalink
Hi. I am considering making bash glob expansion implement rational range
interpretation starting with bash-5.0 -- basically making globasciiranges
the default. It looks like glibc is going to do this for version 2.28 (at
least for a-z, A-Z, and 0-9), and other GNU utilities have done it for some
time. What do folks think?

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU ***@case.edu http://tiswww.cwru.edu/~chet/
Eric Blake
2018-08-06 20:14:14 UTC
Permalink
Post by Chet Ramey
Hi. I am considering making bash glob expansion implement rational range
interpretation starting with bash-5.0 -- basically making globasciiranges
the default. It looks like glibc is going to do this for version 2.28 (at
least for a-z, A-Z, and 0-9), and other GNU utilities have done it for some
time. What do folks think?
I'm in favor of the idea.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
Bob Proulx
2018-08-06 21:12:51 UTC
Permalink
Post by Chet Ramey
Hi. I am considering making bash glob expansion implement rational range
interpretation starting with bash-5.0 -- basically making globasciiranges
the default. It looks like glibc is going to do this for version 2.28 (at
least for a-z, A-Z, and 0-9), and other GNU utilities have done it for some
time. What do folks think?
I think the non-rational ranges in libc were a terrible idea that we
have all been suffering with over the last decade plus.

Bob
Aharon Robbins
2018-08-08 18:28:03 UTC
Permalink
Post by Chet Ramey
Hi. I am considering making bash glob expansion implement rational range
interpretation starting with bash-5.0 -- basically making globasciiranges
the default. It looks like glibc is going to do this for version 2.28 (at
least for a-z, A-Z, and 0-9), and other GNU utilities have done it for some
time. What do folks think?
Chet
As the Founding Father of the Society for Rational Range Interpretation
I can only say that I think this is a wonderful idea!! Yes, please
do it!

Arnold
--
Aharon (Arnold) Robbins arnold AT skeeve DOT com
Bize Ma
2018-08-13 11:38:53 UTC
Permalink
On 08/06/2018 03:07 PM, Chet Ramey wrote:

Hi. I am considering making bash glob expansion implement rational range
interpretation starting with bash-5.0 -- basically making globasciiranges
the default. It looks like glibc is going to do this for version 2.28 (at
least for a-z, A-Z, and 0-9), and other GNU utilities have done it for some
time. What do folks think?


I am in favor of the idea provided there is a way to change back to what is
now the default.

Also, the character order may be extended to use C.utf-8 instead of ASCII
to have an stable order for all UNICODE characters.

Read
https://manpages.debian.org/unstable/open-infrastructure-locales-c.utf-8/locales-c.utf-8.7.en.html
Ilkka Virta
2018-08-15 13:29:31 UTC
Permalink
Post by Chet Ramey
Hi. I am considering making bash glob expansion implement rational range
interpretation starting with bash-5.0 -- basically making globasciiranges
the default. It looks like glibc is going to do this for version 2.28 (at
least for a-z, A-Z, and 0-9), and other GNU utilities have done it for some
time. What do folks think?
I tried to think about a counterpoint, some case for where the current
(non-globasciiranges) behaviour would be useful, but I can't come up
with any. At least the part where [a-z] matches A, but not Z makes it a
bit useless.

If you're considering special-casing just those three, I'd suggest
adding a-f and A-F too, for patterns matching hex digits.

So yeah, +1 from me.
--
Ilkka Virta / ***@iki.fi
Loading...