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

Re: PATCH: 3.1.5 - (Sven) Case-insensitive globbing



Skipping a lot of conversation here ...

On Nov 2,  6:07pm, Peter Stephenson wrote:
} Subject: Re: PATCH: 3.1.5 - (Sven) Case-insensitive globbing
}
} "Zefram" wrote:
} > Case insensitivity is
} > a property of pattern matching, not filename generation.  Therefore the
} > syntax to control case sensitivity should be part of the glob pattern

I've decided that I agree with that.

} I've got two possible implentations to propose (I have them both
} working, the differences aren't so great).

I agree with the choice that's been made of which one to use.

On Nov 2,  6:06pm, Zefram wrote:
} Subject: Re: PATCH: 3.1.5 - (Sven) Case-insensitive globbing
}
} If there were just two senses to the flag, I'd argue for #i and #I (#I
} being the opposite of #i).  In this case perhaps #i, #l and #I could be
} used.  I'd prefer a better mnemonic for the one-way case insensitivity,
} though.

I agree about the mnemonic for one-way, but I think what PWS did is fine
(based on the description at the top of the patch message, I haven't had
a chance to actually try it yet).

On Nov 3,  9:12am, Sven Wischnowsky wrote:
} Subject: Re: PATCH: 3.1.5 - (Sven) Case-insensitive globbing
}
} About the `options for the whole path' thing (which I would like to
} have, too): why not use a generic approach, like the `^' and `-' glob
} modifiers, i.e. `(#i)' works on the current path component, probably
} only up to the next `(#...)' and `(#/i)' works on this and all
} following components (until switched off again).

I think that's getting a bit too complicated.

However, I'm curious how (#i) interacts with parenthesis for grouping.
For example:

zsh% echo zsh-3.1.5/((#i)src/zle|doc/zsh)/make*

Where does the case-insensitivity stop in that expression?  It would be
logical for it to stop at either the vertical bar or the close paren.

BTW, is there going to be a parsing conflict between things like
((#i)src) and math expressions in (( ))?  How do you get the desired
glob behavior if there is?

I'm going to have to catch up on the autocorrect and approximate matching
part of this discussion later, I'm out of time right now.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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