_rpm(): fixed minor bug in --re{build,compile}/--clean/--rms{ource,pec} that

caused compgen error when passed parameter with hyphens
This commit is contained in:
ianmacd 2002-02-24 19:52:22 +00:00
parent 64c42032e2
commit 3a0e91f6a5

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05a
#
# $Id: bash_completion,v 1.143 2002/02/24 06:43:48 ianmacd Exp $
# $Id: bash_completion,v 1.144 2002/02/24 20:52:22 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -846,6 +846,8 @@ _rpm()
COMPREPLY=( $( compgen -W 'nodeps rmsource rmspec sign \
nodirtokens' ${cur_nodash#-} ) )
dashify
# return if $cur is an option
[[ "$cur" == -* ]] && return 0
# complete on source RPMs
COMPREPLY=( ${COMPREPLY[@]} $( compgen -f -X '!*.src.rpm' \
$cur ) )
@ -871,6 +873,8 @@ _rpm()
COMPREPLY=( $( compgen -W 'clean rmsource rmspec' \
${cur_nodash#-} ) )
dashify
# return if $cur is an option
[[ "$cur" == -* ]] && return 0
file_glob spec
return 0
;;