The bash completion for the ebuild command appends a space instead of a slash when completing a directory name. Using | to mark the position of the cursor, I get the following behaviour: Input: ebuild /usr/port|<TAB> Expected: ebuild /usr/portage/| Actual: ebuild /usr/portage | $ complete -p ebuild complete -F _ebuild ebuild $ grep ^complete.*filenames /usr/share/bash-completion/gentoo complete -o filenames -F _emerge emerge complete $filenames -F _ebuild ebuild complete ${filenames} -F _ekeyword ekeyword complete -o filenames -F _splat splat complete -o filenames -F _epm epm So the completion script seems to have some filenames handling stuff planned there, but doesn't actually pass the option due to the fact that that variable isn't set. As other completions set the option unconditionally, the others should probably do the same.
I don't maintain that package, but I have a theory about why it isn't working on dir names the way you expect -- ebuild is not usually called on absolute paths like that. Normally devs call it while working in the package dir, just giving it the plain filename which would sensibly be completed with a space after it. cd /usr/portage/app-shells/gentoo-bashcomp ebuild g<tab> and so forth. Ok, speculation done -- assigning to the real maintainers :)
Created attachment 242303 [details, diff] Add -o filenames unconditionally. Let's try to get some traction here. Perhaps a patch, ready for inclusion, will help. This is beginning to become really annoying. Whenever some package fails and I want to try a fix, I do "ebuild /usr/portage/some-group/package/package-1.2.3.ebuild clean unpack", edit the file and continue with "ebuild ... merge". Having to backspace-slash every dir seperator is a real pain.
I can see that being usefull.
Ping? How much does it take to apply this patch?!
+*gentoo-bashcomp-20101217 (17 Dec 2010) + + 17 Dec 2010; Jeremy Olexa <darkside@gentoo.org> + +gentoo-bashcomp-20101217.ebuild: + Version bump to fix bugs 311441, 327953