[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-12-g34f574d

Ville Skyttä ville.skytta at iki.fi
Thu Feb 10 22:06:28 UTC 2011


The following commit has been merged in the master branch:
commit 34f574dc890c477fd4231c277b55eb2d7efa2364
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Fri Feb 11 00:06:20 2011 +0200

    Add rpmbuild --buildpolicy completion.

diff --git a/completions/rpm b/completions/rpm
index b3ff291..098cdc9 100644
--- a/completions/rpm
+++ b/completions/rpm
@@ -259,7 +259,14 @@ _rpmbuild()
             _filedir
             return 0
             ;;
-        --define|-D|--with|--without|--buildpolicy)
+        --buildpolicy)
+            local cfgdir=$( $rpm --eval '%{_rpmconfigdir}' 2>/dev/null )
+            if [[ $cfgdir ]]; then
+                COMPREPLY=( $( compgen -W "$( command ls $cfgdir/brp-* \
+                    2>/dev/null | sed -ne "s|^$cfgdir/brp-||p" )" -- "$cur" ) )
+            fi
+            ;;
+        --define|-D|--with|--without)
             return 0
             ;;
     esac

-- 
bash-completion



More information about the Bash-completion-commits mailing list