Aaron: I've seen your blog entry about the empty TODO, so here is one item you can add. "equery files" has an option which doesn't appear in bash completion: "--filter=...". For instance, "equery files --filter=doc,man,info bash" will list all bash documentation files. See "equery files --help" for the complete synopsis. Oh, and btw, completion for "equery <some_command> --" could also list "--help".
Committed upstream. Unfortunately, there's not an easy way to complete on --flag=arg1,arg2 type stuff, but it at least now completes on --filter=. --help has been added to each subcommand. Will be FIXED next release.
I've written a function that does completion of "item1<sep>item2<sep>..." lists. Could you point me to the CVS repository of gentoo-bashcomp so that i try to integrate it with your latest update, because i couldn't its location on the CVS web interface (or maybe it's not there?). Thanks.
> Could you point me to the CVS repository of gentoo-bashcomp Oh, ok, it's on BerliOS. Sorry for the stupid question.
It seems that your update adding --help and --filter= is actually not yet on the BerliOS SVN repository, so i will attach the helper function i've wrote and let you integrate it in equery completion code (if you agree sure). Basically, it would be something like that: when ${cur} matches --filter=*, then COMPREPLY=($(_list_compgen "${cur#--filter=}" , \ dir,obj,sym,dev,fifo,path,conf,cmd,doc,man,info)) I'm not quite sure how readable was the _list_compgen() code, so i've added verbose comments to make it clear (feel free to remove them if that's much...). It's pure bash, and i think i've not used anything specific to version 3.
Created attachment 57921 [details] list_completion.sh
ack. guess it'd help if I actually committed it :)
Created attachment 57950 [details, diff] equery_files_filter_completion.patch Here is a patch that adds the list completion function and uses it for --filter=<list>. It's against current trunk version (49).
20050506 is in CVS. Awesome job on the function. I hadn't yet figured out how to do that yet :)
> Awesome job on the function. Thanks. /me too gets bored at work sometime :)