I've generated the simplest code I could think of to illustrate my problem.Suppose I want the foo command to work with files that end with .cc. complete -G '*.cc' fooNow let's suppose my current directory contains foo.cc, bar.cc, and blah.cc. If I type foo and tab, I get:$ foo <tab><tab>bar.cc   blah.cc  foo.cc   $ foo which I expected. But if I type the first letter 'b' and try again:$ foo b<tab><tab>bar.cc   blah.cc  foo.cc$ foo bIt didn't filter the results to those that start with 'b' as it would have for -W.I've searched everything I could find, and haven't found an example of complete -G that does what I want. I'm sure this is a common-enough thing to do; what's the best practices here?
How to properly use complete -G?
bash;autocomplete