[yum-commits] etc/yum.bash

Ville Skyttä scop at osuosl.org
Tue Aug 6 08:59:59 UTC 2013


 etc/yum.bash |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit cc389d5cdd51ae1b81a5f1bedce807ffeea5063b
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Aug 6 11:59:37 2013 +0300

    Add --disableincludes completion.

diff --git a/etc/yum.bash b/etc/yum.bash
index b319963..40541af 100644
--- a/etc/yum.bash
+++ b/etc/yum.bash
@@ -50,7 +50,7 @@ _yum_baseopts()
         --verbose --assumeyes --assumeno --version --installroot --enablerepo
         --disablerepo --exclude --disableexcludes --obsoletes --noplugins
         --nogpgcheck --skip-broken --color --releasever --setopt --downloadonly
-        --downloaddir'
+        --downloaddir --disableincludes'
     [[ $COMP_LINE == *--noplugins* ]] || \
         opts+=" --disableplugin --enableplugin"
     printf %s "$opts"
@@ -111,9 +111,11 @@ _yum_complete_baseopts()
             return 0
             ;;
 
-        --disableexcludes)
+        --disableexcludes|--disableincludes)
             _yum_helper repolist all "$1"
-            COMPREPLY=( $( compgen -W '${COMPREPLY[@]} all main' -- "$1" ) )
+            local main=
+            [[ $2 == *excludes ]] && main=main
+            COMPREPLY=( $( compgen -W '${COMPREPLY[@]} all $main' -- "$1" ) )
             return 0
             ;;
 


More information about the Yum-commits mailing list