Support rpm (jbj rpm 4.4.7+) hrmib exports for rpm -qa filter (via %_hrmib_path /var/cache/hrmib) Not accepted upstream. -- Signed-off-by: Elan Ruusamäe --- bash-completion-2.0/completions/rpm.orig 2012-01-07 23:44:41.000000000 +0100 +++ bash-completion-2.0/completions/rpm 2012-07-28 07:21:12.033708931 +0200 @@ -4,6 +4,12 @@ _rpm_installed_packages() { + # if rpm (4.4.7+) is configured to export it's rpmdb to /var/cache/hrmib (%_hrmib_path) + if [ -d /var/cache/hrmib -a -r /var/cache/hrmib ]; then + COMPREPLY=( $( LC_ALL=C command ls -1 /var/cache/hrmib | sed -ne '/^'$cur'/p') ) + return + fi + if [[ -r /var/log/rpmpkgs && \ /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]]; then # using RHL 7.2 or later - this is quicker than querying the DB