David Mandelberg wrote: > I think that would work. I was hoping to avoid sed, and I was thinking about > using shell's ${parameter#word} to strip and test for matching prefixes. But > I can't think of a way to do that with GIT_COMPLETION_IGNORE_CASE. Modern > bash has ${parameter@L} to lowercase a string, but I don't think the version > of bash on macos has that. With sed it would just be a matter of adding the > i flag if needed. I haven't followed this discussion closely, but you can also use ${parameter,,} to do parameter case modification. Sadly, it looks like those were added in bash-4.0, so Apple will have kept their users from benefiting from that to avoid GPLv3 code. :/ I don't have an ancient bash-3.x like MacOS to test, but maybe they've backported some features? Though if you do end up using this, ${parameter,,} will work in a much wider range of bash version that ${parameter@L} which covers various releases in the OS's we aim to target (e.g. RHEL 8.x, which has bash-4.4). -- Todd