Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Jun 2021 16:08:23 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 256473] FreeBSD shells are case insensitive for character ranges
Message-ID:  <bug-256473-227-69kQCVviX7@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-256473-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-256473-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256473

--- Comment #4 from Stefan E=C3=9Fer <se@FreeBSD.org> ---
(In reply to Jason W. Bacon from comment #2)

> I created a simple test case to reduce noise in this thread, and things g=
ot weirder:
>=20
> Default shell is tcsh.
>=20
> FreeBSD coral.acadix  bacon ~/Test 1032: ls
> aardvark  Alan      Bob       zip
>=20
> FreeBSD coral.acadix  bacon ~/Test 1033: ls -d [A-Z]*
Alan  Bob   zip

This is to be expected. The sequence is: "AaBb..Zz" and you are selecting f=
or
all initial letters except for the files starting with "z" (which comes aft=
er
"Z").

> FreeBSD coral.acadix  bacon ~/Test 1034: ls -d [a-z]*
> aardvark  Alan      Bob       zip

This is to be expected. The sequence is as above and you are selecting for =
all
except those starting with "A" (which is "to the left" of "a").

> FreeBSD coral.acadix  bacon ~/Test 1035: bash
> [bacon@coral ~/Test]$ ls -d [A-Z]*
> Alan Bob
>=20
> [bacon@coral ~/Test]$ ls -d [a-z]*
> aardvark zip
> [/quote]

This is the behavior of BASH if the "globasciiranges" shell option is set to
on.

Check this with the following command:

$ shopt globasciiranges
globasciiranges on

This is an off by default option according to the bash man-page, but appare=
ntly
set in your environment.

With this variable set to off, bash behaves exactly like the other shells.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256473-227-69kQCVviX7>