Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 36910
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Christian Birchinger <joker@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ed Catmur <ed@catmur.co.uk>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
bcdg.patch 2-liner patch patch Ed Catmur 2003-12-31 12:53 0000 521 bytes Details | Diff
gentoo Latest and greatest. text/plain Zach Forrest 2004-01-03 15:04 0000 23.20 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 36910 depends on: Show dependency tree
Bug 36910 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2003-12-31 12:46 0000
Quote: (from forums)

> I type:
> emerge /usr/port [tab]
> 
> The completion works as expected:
> "/usr/portage/"
> 
> I then type:
> kde-b [tab]
> 
> The completion looks like this:
> "/usr/portage/kde-base " {note trailing space, no trailing slash}
> 
> I expect the completion to look like this:
> "/usr/portage/kde-base/" 

Patch to /etc/bash_completion.d/gentoo to follow.

------- Comment #1 From Ed Catmur 2003-12-31 12:53:27 0000 -------
Created an attachment (id=22920) [details]
2-liner patch

Content:

@@ -286,7 +286,9 @@
		fi
  
		if [ "${cur}" ]; then
-			if [ $(echo "${cur}" | grep '/') ]; then
+			if [[ "${cur} " == @('/'|'.'|'~'|'$')* ]]; then
+				COMPREPLY=''
+			elif [ $(echo "${cur}" | grep '/') ]; then
				setbig=$(compgen -G "${cur}*" |
${sedcmd})"${systemactions}"
				COMPREPLY=($(echo "${setbig}" | $grepcmd))
			else

Using the same conditional expression as in the unmerge stanza to differentiate
paths (absolute and relative) from Gentoo package names.

------- Comment #2 From Zach Forrest 2004-01-03 15:04:12 0000 -------
Created an attachment (id=23107) [details]
Latest and greatest.

This incorporates the patch previously attached (thanks, Ed) and contains
improvements to the previous version. Please let me know if you encounter any
problems.

------- Comment #3 From Christian Birchinger 2004-01-04 07:50:04 0000 -------
Do you have a cleaned up (Removed commented out lines etc.) version for next
release? I have to merge it then with the other commited functions which are
added in the current version of gentoo.completion (20031215).

------- Comment #4 From Christian Birchinger 2004-01-04 08:13:36 0000 -------
Shouldn't the '| grep ^${cur}' be replaced with '-- ${cur}' ?
Removes the need for one external command which is always good
in bash-completion.

------- Comment #5 From Christian Birchinger 2004-01-16 07:17:36 0000 -------
I'm closing this bug because a fix has been added to the current version.

I'm still willing to update the whole gentoo complition but i need a cleaned version for a release.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug