[yum-commits] Branch 'yum-3_2_X' - 2 commits - etc/yum.bash

Ville Skyttä scop at osuosl.org
Fri Jan 22 18:47:07 UTC 2010


 etc/yum.bash |   30 +++++++++++++++++++++++-------
 1 file changed, 23 insertions(+), 7 deletions(-)

New commits:
commit e89c8aaff5acdb4b3739a2fc51de0e7c0fe40d03
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Jan 22 20:42:46 2010 +0200

    sed portability fixes.

diff --git a/etc/yum.bash b/etc/yum.bash
index f100970..5dfdb64 100644
--- a/etc/yum.bash
+++ b/etc/yum.bash
@@ -11,7 +11,7 @@ _yum_list()
         # for English :P
         COMPREPLY=( "${COMPREPLY[@]}"
             $( ${yum:-yum} -d 0 -C list $1 "$2*" 2>/dev/null | \
-                sed -ne '/^\(Available\|Installed\|Updated\) /d' \
+                sed -ne '/^Available /d' -e '/^Installed /d' -e '/^Updated /d' \
                 -e 's/[[:space:]].*//p' ) )
     else
         # Drop first line (e.g. "Updated Packages") - would be nice if e.g.
@@ -32,10 +32,9 @@ _yum_repolist()
     # Drop first ("repo id      repo name") and last ("repolist: ...") rows -
     # would be nice if e.g. -d 0 did that for us.
     COMPREPLY=( "${COMPREPLY[@]}"
-        $( compgen -W "$( ${yum:-yum} --noplugins -C repolist $1 \
-            2>/dev/null | \
-            sed -ne '/^repo\(\s\{1,\}id\|list:\)/d' -e 's/[[:space:]].*//p' )" \
-            -- "$2" ) )
+        $( compgen -W "$( ${yum:-yum} --noplugins -C repolist $1 2>/dev/null | \
+            sed -ne '/^repo\s\{1,\}id/d' -e '/^repolist:/d' \
+            -e 's/[[:space:]].*//p' )" -- "$2" ) )
 }
 
 # arguments:
commit 2d01356b9c4b2e63af5b5fa8cbf3d015541cc7a7
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Jan 22 20:30:16 2010 +0200

    Add option argument completions for a bunch of known plugin options.

diff --git a/etc/yum.bash b/etc/yum.bash
index 066fb8c..f100970 100644
--- a/etc/yum.bash
+++ b/etc/yum.bash
@@ -238,7 +238,7 @@ _yum()
             return 0
             ;;
 
-        --installroot)
+        --installroot|--downloaddir)
             COMPREPLY=( $( compgen -d -- "$cur" ) )
             return 0
             ;;
@@ -274,7 +274,24 @@ _yum()
             return 0
             ;;
 
-        -R|--randomwait|-x|--exclude|-h|--help|--version|--releasever)
+        -R|--randomwait|-x|--exclude|-h|--help|--version|--releasever|--cve|\
+        --bz|--advisory|--tmprepo|--verify-filenames)
+            return 0
+            ;;
+
+        --download-order)
+            COMPREPLY=( $( compgen -W 'default smallestfirst largestfirst' \
+                -- "$cur" ) )
+            return 0
+            ;;
+
+        --override-protection)
+            _yum_list installed "$cur"
+            return 0
+            ;;
+
+        --verify-configuration-files)
+            COMPREPLY=( $( compgen -W '1 0' -- "$cur" ) )
             return 0
             ;;
     esac


More information about the Yum-commits mailing list