fixed RPM completion. Not all RPMs were found when completing -e, etc.
This commit is contained in:
parent
be23dd6072
commit
b1513938c3
@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# <![CDATA[
|
# <![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>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -632,7 +632,7 @@ _rpm()
|
|||||||
[[ "$cur" == -* ]] && return 0
|
[[ "$cur" == -* ]] && return 0
|
||||||
# complete on basename of installed RPMs
|
# complete on basename of installed RPMs
|
||||||
COMPREPLY=( $( rpm -qa | \
|
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
|
return 0
|
||||||
;;
|
;;
|
||||||
-qa*)
|
-qa*)
|
||||||
@ -655,7 +655,7 @@ _rpm()
|
|||||||
[[ "$cur" == -* ]] && return 0
|
[[ "$cur" == -* ]] && return 0
|
||||||
# add a list of RPMS to possible completions
|
# add a list of RPMS to possible completions
|
||||||
COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
|
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
|
return 0
|
||||||
;;
|
;;
|
||||||
-[Vy]*)
|
-[Vy]*)
|
||||||
@ -667,7 +667,7 @@ _rpm()
|
|||||||
[[ "$cur" == -* ]] && return 0
|
[[ "$cur" == -* ]] && return 0
|
||||||
# add a list of RPMS to possible completions
|
# add a list of RPMS to possible completions
|
||||||
COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
|
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
|
return 0
|
||||||
;;
|
;;
|
||||||
-b*)
|
-b*)
|
||||||
@ -707,7 +707,7 @@ _rpm()
|
|||||||
--set@(perms|gids))
|
--set@(perms|gids))
|
||||||
# complete on installed RPMs
|
# complete on installed RPMs
|
||||||
COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
|
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
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
x
Reference in New Issue
Block a user