Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235454 - app-shells/gentoo-bashcomp doesn't support completion of portage sets.
Summary: app-shells/gentoo-bashcomp doesn't support completion of portage sets.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
: 626748 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-08-22 13:34 UTC by Peter Sterk
Modified: 2018-06-23 22:23 UTC (History)
6 users (show)

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


Attachments
updated bash completion for ebuild (gentoo.diff,659 bytes, patch)
2010-06-13 09:33 UTC, Daniel Pielmeier
Details | Diff
gentoo-bashcomp-sets.patch (gentoo-bashcomp-sets.patch,631 bytes, patch)
2017-08-17 06:22 UTC, Marco Genasci
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Sterk 2008-08-22 13:34:25 UTC
The Gentoo bash completion package app-shells/gentoo-bashcomp does not provide completion for the new features in Portage 2.2, such as sets and the --keep-going option.

Reproducible: Always

Steps to Reproduce:
1. emerge gentoo-bashcomp
2. Type "emerge --ke" (without the quotes) and hit tab twice.
3. Watch as no completion for --keep-going is produced.
Actual Results:  
No completion is performed; the system will beep.

Expected Results:  
The command should be autocompleted, or completion suggestions should be displayed.

With the stable version of bash-completion, the @ disappears if you hit tab when trying to complete a set name. This behaviour does not occur with app-shells/bash-completion-20060301, but it does not recognise the @ as being part of a name, since it suggests normal packages. If that is a bug (I am not sure whether or not it is), it may need to be fixed before adding sets support to gentoo-bashcomp, because set names are, of course, prefixed with an @.
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-02-23 03:13:48 UTC
Just added --keep-going and --jobs= to the completion module. You will see this in the next day or so. 

Thanks for the report, changing the summary to reflect the last issue.
Comment 2 Daniel Pielmeier gentoo-dev 2010-06-13 09:33:24 UTC
Created attachment 235157 [details, diff]
updated bash completion for ebuild

Also ebuild is not up to date wrt portage 2.2 features and EAPI additions. Most important is completion for configure and prepare. Attached patch adds all possible commands for current stable portage.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-12-17 03:48:06 UTC
(In reply to comment #2)
> Created an attachment (id=235157) [details]
> updated bash completion for ebuild
> 
> Also ebuild is not up to date wrt portage 2.2 features and EAPI additions. Most
> important is completion for configure and prepare. Attached patch adds all
> possible commands for current stable portage.
> 

I don't get this comment. http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-bashcomp/trunk/gentoo?r1=91&r2=94 I'll ignore it.
Comment 4 Daniel Pielmeier gentoo-dev 2010-12-17 08:49:59 UTC
(In reply to comment #3)

> I don't get this comment.
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-bashcomp/trunk/gentoo?r1=91&r2=94
> I'll ignore it.

At this time my patch added all possible completions for ebuild actions and there were more then configure and prepare. Probably no one uses them so they are useless.

Hm, the stable version which should include completion for configure and prepare does not work for me. Need to check this.
Comment 5 Daniel Pielmeier gentoo-dev 2011-03-06 19:39:45 UTC
(In reply to comment #4)
> 
> Hm, the stable version which should include completion for configure and
> prepare does not work for me. Need to check this.

Probably an error on my side. Looks okay now.
Comment 6 Duncan 2012-12-19 07:47:37 UTC
I could really use @sets completion. CCing.
Comment 7 Zac Medico gentoo-dev 2012-12-19 09:43:08 UTC
gentoo-bashcomp could call `emerge --list-sets` to get a list of available sets.
Comment 8 Marco Genasci 2017-08-17 06:19:39 UTC
*** Bug 626748 has been marked as a duplicate of this bug. ***
Comment 9 Marco Genasci 2017-08-17 06:22:45 UTC
Created attachment 489372 [details, diff]
gentoo-bashcomp-sets.patch

Patch for support set with emerge bash-completion
Comment 10 Louis Sautier (sbraz) gentoo-dev 2018-06-10 17:03:27 UTC
I've made a PR on GitHub based on Marco's patch.
Comment 11 Larry the Git Cow gentoo-dev 2018-06-23 22:23:32 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/proj/gentoo-bashcomp.git/commit/?id=48adce4356f46eda30265d2c5a6cb4055c16c5e3

commit 48adce4356f46eda30265d2c5a6cb4055c16c5e3
Author:     Louis Sautier <sautier.louis@gmail.com>
AuthorDate: 2018-06-10 16:26:46 +0000
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: 2018-06-23 22:23:00 +0000

    emerge: add support for sets completion.
    
    Based on Marco Genasci's patch and slightly modified to get rid of the
    unnecessary call to xargs.
    
    Courtesy of Marco Genasci <fedeliallalinea@gmail.com>.
    
    Closes: https://bugs.gentoo.org/235454
    Closes: https://github.com/gentoo/gentoo-bashcomp/pull/4

 completions/emerge | 6 ++++++
 1 file changed, 6 insertions(+)