_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:
parent
64c42032e2
commit
3a0e91f6a5
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05a
|
# 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>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -846,6 +846,8 @@ _rpm()
|
|||||||
COMPREPLY=( $( compgen -W 'nodeps rmsource rmspec sign \
|
COMPREPLY=( $( compgen -W 'nodeps rmsource rmspec sign \
|
||||||
nodirtokens' ${cur_nodash#-} ) )
|
nodirtokens' ${cur_nodash#-} ) )
|
||||||
dashify
|
dashify
|
||||||
|
# return if $cur is an option
|
||||||
|
[[ "$cur" == -* ]] && return 0
|
||||||
# complete on source RPMs
|
# complete on source RPMs
|
||||||
COMPREPLY=( ${COMPREPLY[@]} $( compgen -f -X '!*.src.rpm' \
|
COMPREPLY=( ${COMPREPLY[@]} $( compgen -f -X '!*.src.rpm' \
|
||||||
$cur ) )
|
$cur ) )
|
||||||
@ -871,6 +873,8 @@ _rpm()
|
|||||||
COMPREPLY=( $( compgen -W 'clean rmsource rmspec' \
|
COMPREPLY=( $( compgen -W 'clean rmsource rmspec' \
|
||||||
${cur_nodash#-} ) )
|
${cur_nodash#-} ) )
|
||||||
dashify
|
dashify
|
||||||
|
# return if $cur is an option
|
||||||
|
[[ "$cur" == -* ]] && return 0
|
||||||
file_glob spec
|
file_glob spec
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user