[Bash-completion-devel] _filedir case sensitivity
Ville Skyttä
ville.skytta at iki.fi
Tue Sep 14 18:15:46 UTC 2010
Hello,
Unfortunately the -X option to compgen/complete is case sensitive and I don't
think bash provides any way to affect that. As a result, a lot of our
filename completions either contain redundantish information and are
annoyingly hard to read, or we simply miss filename completions for files
whose case doesn't happen to be the expected one (usually lowercase).
The attached patch provides some automatic case insensitivity to _filedir and
_filedir_xspec by automatically matching all-uppercase versions of the passed
patterns as well as the original ones. The idea is that if this goes in, all
glob arguments to _filedir and the _filedir_xspec things can be cleaned up to
all lowercase and we'd get better case insensitivity support automatically
even without this work. The downsides are that this isn't exactly that
pretty, and that strictly case sensitive (non-all-uppercase) completions would
no longer be possible. I don't think these are big issues at all.
Thoughts, objections?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filedir-upcase.patch
Type: text/x-patch
Size: 1317 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20100914/7d2bf59e/attachment.bin>
More information about the Bash-completion-devel
mailing list