_rpm(): add --nodeps and --nodirtokens to possible completions for rpm -b*
and rpm -t* _rpm(): add --rmsource, --rmspec, --sign & --nodirtokens to possible completions for rpm --rebuild and rpm --recompile _rpm(): rpm --recompile and --rebuild now offer compatible long options as possible completions, even when current parameter does not start with a '-' _rpm(): rpm --clean, --rmsource and --rmspec now offer compatible long options as possible completions, even when current parameter does not start with a '-'
This commit is contained in:
parent
5629a67cbb
commit
d9f457cf96
@ -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.114 2002/02/14 20:07:42 ianmacd Exp $
|
# $Id: bash_completion,v 1.115 2002/02/14 21:11:31 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -813,7 +813,7 @@ _rpm()
|
|||||||
# complete on list of relevant options
|
# complete on list of relevant options
|
||||||
COMPREPLY=( $( compgen -W 'short-circuit timecheck clean \
|
COMPREPLY=( $( compgen -W 'short-circuit timecheck clean \
|
||||||
rmsource rmspec test sign buildroot target buildarch buildos \
|
rmsource rmspec test sign buildroot target buildarch buildos \
|
||||||
nobuild' ${cur_nodash#-} ) )
|
nobuild nodeps nodirtokens' ${cur_nodash#-} ) )
|
||||||
dashify
|
dashify
|
||||||
# return if $cur is an option
|
# return if $cur is an option
|
||||||
[[ "$cur" == -* ]] && return 0
|
[[ "$cur" == -* ]] && return 0
|
||||||
@ -831,13 +831,11 @@ _rpm()
|
|||||||
;;
|
;;
|
||||||
--re@(build|compile))
|
--re@(build|compile))
|
||||||
_expand || return 0
|
_expand || return 0
|
||||||
if [[ "$cur" == -* ]]; then
|
COMPREPLY=( $( compgen -W 'nodeps rmsource rmspec sign \
|
||||||
COMPREPLY=( $( compgen -W 'nodeps' ${cur_nodash#-} ) )
|
nodirtokens' ${cur_nodash#-} ) )
|
||||||
dashify
|
dashify
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
# complete on source RPMs
|
# complete on source RPMs
|
||||||
COMPREPLY=( $( compgen -G $cur\*.src.rpm ) )
|
COMPREPLY=( ${COMPREPLY[@]} $( compgen -G $cur\*.src.rpm ) )
|
||||||
[ ${#COMPREPLY[@]} = 0 ] && COMPREPLY=( $( compgen -d $cur ) )
|
[ ${#COMPREPLY[@]} = 0 ] && COMPREPLY=( $( compgen -d $cur ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@ -858,12 +856,9 @@ _rpm()
|
|||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
--@(clean|rms@(ource|pec)))
|
--@(clean|rms@(ource|pec)))
|
||||||
if [[ "$cur" == -* ]]; then
|
|
||||||
COMPREPLY=( $( compgen -W 'clean rmsource rmspec' \
|
COMPREPLY=( $( compgen -W 'clean rmsource rmspec' \
|
||||||
${cur_nodash#-} ) )
|
${cur_nodash#-} ) )
|
||||||
dashify
|
dashify
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
file_glob spec
|
file_glob spec
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user