diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-09-03 23:13:27 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-09-03 23:13:27 +0300 |
commit | 914da74d2cd4858b0926bb27b0e2b642d7d80790 (patch) | |
tree | 9a1ecf3baabeadfc358f5005ab5ed7795f3c47bb | |
parent | bae99345fdd1297ebb31ab910a8cb063a359b43c (diff) | |
download | bash-completion-914da74d2cd4858b0926bb27b0e2b642d7d80790.tar.gz |
rpm: "Export" compatible build arch completion as _rpm_buildarchs for reuse.
-rw-r--r-- | completions/rpm | 10 |
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) |