Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 350179 - app-shells/gentoo-bashcomp: completion for 'equery uses' and 'equery which' does not work
Summary: app-shells/gentoo-bashcomp: completion for 'equery uses' and 'equery which' d...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 350186
  Show dependency tree
 
Reported: 2010-12-30 20:12 UTC by Jacek Sowiński
Modified: 2021-04-18 16:18 UTC (History)
0 users

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


Attachments
Fixes completion for equery 'uses' and 'which' modules (equery_uses-which.patch,1.49 KB, patch)
2010-12-30 20:19 UTC, Jacek Sowiński
Details | Diff
patch (0001-350179-fix-the-completion-for-uses-and-which-modules.patch,1.93 KB, patch)
2012-04-24 14:24 UTC, Jacek Sowiński
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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