summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-09-03 23:13:27 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-09-03 23:13:27 +0300
commit914da74d2cd4858b0926bb27b0e2b642d7d80790 (patch)
tree9a1ecf3baabeadfc358f5005ab5ed7795f3c47bb
parentbae99345fdd1297ebb31ab910a8cb063a359b43c (diff)
downloadbash-completion-914da74d2cd4858b0926bb27b0e2b642d7d80790.tar.gz
rpm: "Export" compatible build arch completion as _rpm_buildarchs for reuse.
-rw-r--r--completions/rpm10
1 files changed, 7 insertions, 3 deletions
diff --git a/completions/rpm b/completions/rpm
index 3984524c..165982ae 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)