Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 321442 Details for
Bug 431578
app-shells/gentoo-bashcomp - proper support for atoms preceded by equal sign in _pkgname()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Second patch to fix support for atoms with 'equal-sign'
0004-Full-I-hope-support-for-atoms-preceded-by-equal-sign.patch (text/plain), 5.87 KB, created by
Jacek Sowiński
on 2012-08-15 22:49:52 UTC
(
hide
)
Description:
Second patch to fix support for atoms with 'equal-sign'
Filename:
MIME Type:
Creator:
Jacek Sowiński
Created:
2012-08-15 22:49:52 UTC
Size:
5.87 KB
patch
obsolete
>From 52a1215ba9d837d3c9332be21bcacecabf8464c5 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Jacek=20Sowi=C5=84ski?= <mruwek.gentoo@vcf.pl> >Date: Tue, 24 Apr 2012 15:20:18 +0200 >Subject: [PATCH 4/4] Full (I hope) support for atoms preceded by equal sign ('=some-category/package-version'). > > 1. Add '=' automatically only when completing installed packages (`_pkgname -I`). > 2. Add appropriate conditions for other equery modes. > >--HG-- >extra : rebase_source : cc1c595e6da72a80d180ea8e9e9fbfeecffe6406 >--- > gentoo | 34 +++++++++++++++++----------------- > 1 files changed, 17 insertions(+), 17 deletions(-) > >diff --git a/gentoo b/gentoo >index 5176041..c08829c 100644 >--- a/gentoo >+++ b/gentoo >@@ -87,6 +87,12 @@ _pkgname() > only=1 > _pkgname_only ${cur} @GENTOO_PORTAGE_EPREFIX@/var/db/pkg > fi >+ # 'equery' wants an '=' in front of specific package versions. >+ # Add it if there is only one selected package and it isn't there already. >+ if [[ ${#COMPREPLY[@]} == 1 && ${prev} != "=" ]] >+ then >+ [[ -z "${only}" ]] && COMPREPLY=("="$COMPREPLY) >+ fi > ;; > -A) > # Complete either the category or the complete package name >@@ -154,12 +160,6 @@ _pkgname() > # Somebody screwed up! :-) > ;; > esac >- # 'equery' wants an '=' in front of specific package versions. >- # Add it if there is only one selected package and it isn't there already. >- if [[ ${#COMPREPLY[@]} == 1 && ${prev} != "=" ]] >- then >- [[ -z "${only}" ]] && COMPREPLY=("="$COMPREPLY) >- fi > } > > # >@@ -1144,7 +1144,7 @@ _equery() > ;; > c?(hanges)) > # Complete package name only if it is not yet supplied. >- if [[ ${prev} == ${mode} ]]; then >+ if [[ ${prev} == ${mode} || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help" -- $cur)) >@@ -1195,7 +1195,7 @@ _equery() > y|keywords) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case "${cur}" in > -*) > COMPREPLY=($(compgen -W "-h --help -v --version -a --arch -A >@@ -1211,7 +1211,7 @@ _equery() > l?(ist)) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case "${cur}" in > -*) > COMPREPLY=($(compgen -W "-h --help -d --duplicates -b >@@ -1232,7 +1232,7 @@ _equery() > b?(elongs)) > # Only complete if the previous entry on the command line is not > # a file name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help -f --full-regex -e >@@ -1248,7 +1248,7 @@ _equery() > u?(ses)) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help -a --all" -- $cur)) >@@ -1263,7 +1263,7 @@ _equery() > w?(hich)) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help -m --include-masked" -- $cur)) >@@ -1278,7 +1278,7 @@ _equery() > g|depgraph) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help -A --no-atom -M --no-mask -U >@@ -1294,7 +1294,7 @@ _equery() > d?(epends)) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help -a --all-packages -D >@@ -1318,14 +1318,14 @@ _equery() > m?(eta)) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > _equery_meta $cur > fi > ;; > k|check) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} ]]; then >+ if [[ ${prev} == ${mode} || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "${COMPREPLY[@]} -h --help -f >@@ -1341,7 +1341,7 @@ _equery() > s?(ize)) > # Only complete if the previous entry on the command line is not > # a package name. >- if [[ ${prev} == ${mode} || ${prev:0:1} == "-" ]]; then >+ if [[ ${prev} == ${mode} || ${prev:0:1} == "-" || ${prev} == '=' ]]; then > case $cur in > -*) > COMPREPLY=($(compgen -W "-h --help -b --bytes -f >-- >1.7.3.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 431578
:
321440
| 321442 |
321444