Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 327953 - app-shells/gentoo-bashcomp-20100613: unset $filenames causes missing slash after dir names to ebuild command
Summary: app-shells/gentoo-bashcomp-20100613: unset $filenames causes missing slash af...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2010-07-12 16:22 UTC by Martin von Gagern
Modified: 2010-12-17 04:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Add -o filenames unconditionally. (bug327953a.patch,671 bytes, patch)
2010-08-10 20:30 UTC, Martin von Gagern
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2010-07-12 16:22:03 UTC
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.
Comment 1 Wormo (RETIRED) gentoo-dev 2010-07-19 06:15:40 UTC
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 :)
Comment 2 Martin von Gagern 2010-08-10 20:30:17 UTC
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.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-08-10 20:43:34 UTC
I can see that being usefull.
Comment 4 Martin von Gagern 2010-09-22 11:17:11 UTC
Ping? How much does it take to apply this patch?!
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-17 04:18:29 UTC
+*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