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

Re: NO_CASE_GLOB and unreadable directories (Episode VI: A New Hope)



> On 25 January 2021 at 00:52 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> I see these possibilities:
> 1) Do nothing; Devin's case is broken by design and termux needs to
> come up with a solution that doesn't involve NO_CASE_GLOB.
> 2) Adopt (a CYGWIN-clean variant of) my patch from workers/47832, and
> accept that some current usage of NO_CASE_GLOB will break.
> 3) Add a setopt (CASE_DIRS ?) for the current behavior, and merge that
> with workers/47832.  I haven't yet worked out how to avoid having
> "setopt nocasedirs" imply the effects of "setopt nocaseglob" ...
> perhaps name it CASE_SEARCH (?) and simply leave the implication?

I don't think 2) is so unreasonable in that only patterns with some
form of case-insensitivity are involved.  This is something of a minefield
at the best of times and getting something that looks natural on systems
that are intrinsically case-insensitive, whether or not case-preserving,
is difficult.  But with a new option it seems to provide a definite path
forward in any case.  The only serious objection to that other that I
can see is that it makes the code more complicated; the reply to that is
if the code is simple there's a good chance it doesn't quite do what you
need it to.

(For the same reasons I'm not actually commenting on the details, since
I'm well aware how easy it is to miss some crucial aspect.)

pws




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