[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 474896f2c8093e5211b5530a59b0e6c1fc4f6f84
Ville Skyttä
ville.skytta at iki.fi
Tue Oct 20 19:47:35 UTC 2009
The following commit has been merged in the master branch:
commit 474896f2c8093e5211b5530a59b0e6c1fc4f6f84
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Tue Oct 20 22:47:31 2009 +0300
Speed up installed rpm package completion on SUSE (Alioth: #312021).
diff --git a/CHANGES b/CHANGES
index 53e7906..7c4f629 100644
--- a/CHANGES
+++ b/CHANGES
@@ -20,6 +20,8 @@ bash-completion (1.x)
* Add lftpget completion.
* Don't overwrite other host completions when completing from multiple
SSH known hosts files.
+ * Speed up installed rpm package completion on SUSE, based on work by
+ Marco Poletti (Alioth: #312021).
-- David Paleino <d.paleino at gmail.com> Sun, 11 Oct 2009 11:11:57 +0200
diff --git a/contrib/rpm b/contrib/rpm
index dbfcc8f..0aad0f5 100644
--- a/contrib/rpm
+++ b/contrib/rpm
@@ -13,6 +13,9 @@ _rpm_installed_packages()
COMPREPLY=( $( sed -ne \
's|^\('$cur'[^[:space:]]*\)-[^[:space:]-]\+-[^[:space:]-]\+\.rpm$|\1|p' \
/var/log/rpmpkgs ) )
+ elif type rpmqpack &>/dev/null ; then
+ # SUSE's rpmqpack is faster than rpm -qa
+ COMPREPLY=( $( compgen -W '$( rpmqpack )' -- "$cur" ) )
else
_rpm_nodigsig
COMPREPLY=( $( rpm -qa $nodig $nosig --qf='%{NAME} ' "$cur*" ) )
--
bash-completion
More information about the Bash-completion-commits
mailing list