[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-427-g914da74

Ville Skyttä ville.skytta at iki.fi
Sat Sep 3 20:16:48 UTC 2011


The following commit has been merged in the master branch:
commit 914da74d2cd4858b0926bb27b0e2b642d7d80790
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Sep 3 23:13:27 2011 +0300

    rpm: "Export" compatible build arch completion as _rpm_buildarchs for reuse.

diff --git a/completions/rpm b/completions/rpm
index 3984524..165982a 100644
--- a/completions/rpm
+++ b/completions/rpm
@@ -35,6 +35,13 @@ _rpm_macros()
         -- "$cur" ) )
 }
 
+_rpm_buildarchs()
+{
+    COMPREPLY=( $( compgen -W "$( ${1:-rpm} --showrc | sed -ne \
+        's/^\s*compatible\s\s*build\s\s*archs\s*:\s*\(.*\)/\1/ p' )" \
+        -- "$cur" ) )
+}
+
 # rpm(8) completion
 #
 _rpm()
@@ -243,9 +250,6 @@ _rpmbuild()
             return 0
             ;;
         --target)
-            COMPREPLY=( $( compgen -W "$( $rpm --showrc | sed -ne \
-                's/^\s*compatible\s\s*build\s\s*archs\s*:\s*\(.*\)/\1/ p' )" \
-                -- "$cur" ) )
             return 0
             ;;
         --eval|-E)

-- 
bash-completion



More information about the Bash-completion-commits mailing list