Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 350179

Summary: app-shells/gentoo-bashcomp: completion for 'equery uses' and 'equery which' does not work
Product: Gentoo Linux Reporter: Jacek Sowiński <mruwek.gentoo>
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 350186    
Attachments: Fixes completion for equery 'uses' and 'which' modules
patch

Description Jacek Sowiński 2010-12-30 20:12:18 UTC
Looks like there is some lack of necessary code (very similar to #298919).

Take a look and compare:
    @(u?(ses)|w?(hich)))
        # Only complete if the previous entry on the command line is not
        # a package name.
        if [[ ${prev} == ${mode} ]]; then
            # Complete on all package names.
            _pkgname -A $cur
                COMPREPLY=($(compgen -W "${COMPREPLY[@]} --help" -- ${cur}))
        fi
        ;;

versus:

    s?(ize))
        # Only complete if the previous entry on the command line is not
        # a package name.
        if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then
        case $cur in
            -*)
            COMPREPLY=($(compgen -W "--help -b --bytes" -- $cur))
            ;;
            *)
            # Only installed packages can have their size calculated.
            _pkgname -I $cur
            ;;
        esac
        fi
        ;;

Also 'uses' and 'which' modules no longer have the same options, so there
is need to separate them.

Patch in a moment.
Comment 1 Jacek Sowiński 2010-12-30 20:19:25 UTC
Created attachment 258464 [details, diff]
Fixes completion for equery 'uses' and 'which' modules
Comment 2 Jacek Sowiński 2012-04-24 14:24:57 UTC
Created attachment 309915 [details, diff]
patch

- fix pkgspec completion
- separate completion for these modules, as they have another sets of options