fixed RPM completion. Not all RPMs were found when completing -e, etc.

master
ianmacd 2000-10-29 22:17:19 +00:00
parent be23dd6072
commit b1513938c3
1 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@
#
# <![CDATA[
#
# $Id: bash_completion,v 1.8 2000/10/19 17:25:36 ianmacd Exp $
# $Id: bash_completion,v 1.9 2000/10/29 23:17:19 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -632,7 +632,7 @@ _rpm()
[[ "$cur" == -* ]] && return 0
# complete on basename of installed RPMs
COMPREPLY=( $( rpm -qa | \
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.]\+$/\1/p' ) )
return 0
;;
-qa*)
@ -655,7 +655,7 @@ _rpm()
[[ "$cur" == -* ]] && return 0
# add a list of RPMS to possible completions
COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.]\+$/\1/p' ) )
return 0
;;
-[Vy]*)
@ -667,7 +667,7 @@ _rpm()
[[ "$cur" == -* ]] && return 0
# add a list of RPMS to possible completions
COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.]\+$/\1/p' ) )
return 0
;;
-b*)
@ -707,7 +707,7 @@ _rpm()
--set@(perms|gids))
# complete on installed RPMs
COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.]\+$/\1/p' ) )
return 0
;;
esac