Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77879 - Various fixes to ebuild bash_completion
Summary: Various fixes to ebuild bash_completion
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-13 12:15 UTC by Ed Catmur
Modified: 2005-01-17 16:40 UTC (History)
0 users

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


Attachments
gentoo.patch (gentoo.patch,852 bytes, patch)
2005-01-13 12:34 UTC, Ed Catmur
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2005-01-13 12:15:59 UTC
Firstly, 

  $ ebuild /usr/portage/media-vid<tab>

gives /usr/portage/media-video(space): should be /usr/portage/media-video/

Secondly,

  $ ebuild --debug <tab>

gives a list of actions ..., should be a list of ebuilds

Thirdly, 

  $ ebuild foo.ebuild clean <tab>

gives a list of ebuilds etc, should be further actions.
Comment 1 Ed Catmur 2005-01-13 12:30:18 UTC
Here's what I've changed it to in my /etc/bash_completion.d/gentoo:

#
# ebuild completion command
#
have ebuild && {
_ebuild()
{
	local cur
	COMPREPLY=()
	cur=${COMP_WORDS[COMP_CWORD]}
	if [ $COMP_CWORD -eq 1 ]; then
		COMPREPLY=($(compgen -f -X "!*.ebuild" -- ${cur}) $(compgen -d -- ${cur}) $(compgen -W '--debug' -- ${cur}))
	elif [ $COMP_CWORD -eq 2 -a "${COMP_WORDS[1]}" = "--debug" ]; then
		COMPREPLY=($(compgen -f -X "!*.ebuild" -- ${cur}) $(compgen -d -- ${cur}))
	elif [ $COMP_CWORD -ge 2 ]; then
		COMPREPLY=($(compgen -W 'clean compile config \
			depend digest \
			fetch \
			help \
			install \
			merge \
			package postinst postrm preinst prerm \
			qmerge \
			rpm \
			setup \
			unmerge unpack' ${cur}))
	fi
	return 0
}
complete $filenames -F _ebuild ebuild
}

I'll also attach it as a patch.
Comment 2 Ed Catmur 2005-01-13 12:34:00 UTC
Created attachment 48419 [details, diff]
gentoo.patch
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2005-01-17 16:40:22 UTC
Thanks Ed. 20050112-r1 has just been committed.