summaryrefslogtreecommitdiff
path: root/completions/rpm
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-05-02 11:41:52 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-05-02 11:45:55 +0300
commitc875723bef3b47a1fb0f364e6e0b2c282f46dce3 (patch)
tree5a4945a631e02b93c277de7e180ff5c45b5c9ce4 /completions/rpm
parent0a84ad771dcd063c48b8f1dca4c4d7cb2b01814b (diff)
downloadbash-completion-c875723bef3b47a1fb0f364e6e0b2c282f46dce3.tar.gz
Include trailing equals sign in options that take arguments that way.
This way it's clearer to users that an argument is expected. It's likely that this commit does not catch all such cases, but it should do it for most of the affected commands I have installed.
Diffstat (limited to 'completions/rpm')
-rw-r--r--completions/rpm20
1 files changed, 11 insertions, 9 deletions
diff --git a/completions/rpm b/completions/rpm
index a95f3bca..3984524c 100644
--- a/completions/rpm
+++ b/completions/rpm
@@ -116,8 +116,8 @@ _rpm()
$split && return 0
# options common to all modes
- local opts="--define --eval --macros --nodigest --nosignature --rcfile \
- --quiet --pipe --verbose"
+ local opts="--define= --eval= --macros= --nodigest --nosignature \
+ --rcfile= --quiet --pipe --verbose"
case ${words[1]} in
-[iFU]*|--install|--freshen|--upgrade)
@@ -125,10 +125,10 @@ _rpm()
COMPREPLY=( $( compgen -W "$opts --percent --force \
--test --replacepkgs --replacefiles --root \
--excludedocs --includedocs --noscripts --ignorearch \
- --dbpath --prefix --ignoreos --nodeps --allfiles \
+ --dbpath --prefix= --ignoreos --nodeps --allfiles \
--ftpproxy --ftpport --justdb --httpproxy --httpport \
- --noorder --relocate --badreloc --notriggers \
- --excludepath --ignoresize --oldpackage \
+ --noorder --relocate= --badreloc --notriggers \
+ --excludepath= --ignoresize --oldpackage \
--queryformat --repackage --nosuggests" -- "$cur" ) )
else
_filedir '[rs]pm'
@@ -148,7 +148,7 @@ _rpm()
opts+=" --changelog --configfiles --conflicts --docfiles
--dump --enhances --filesbypkg --filecaps --fileclass
--filecolor --fileprovide --filerequire --filesbypkg --info
- --list --obsoletes --pipe --provides --queryformat --rcfile
+ --list --obsoletes --pipe --provides --queryformat=
--requires --scripts --suggests --triggers --xml"
if [[ ${words[@]} == *\ -@(*([^ -])f|-file )* ]]; then
@@ -175,7 +175,7 @@ _rpm()
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W "$opts --all --file --fileid
--dbpath --fscontext --ftswalk --group --hdrid --last
- --package --pkgid --root --specfile --state
+ --package --pkgid --root= --specfile --state
--triggeredby --whatprovides --whatrequires" \
-- "$cur" ) )
elif [[ ${words[@]} != *\ -@(*([^ -])a|-all )* ]]; then
@@ -193,7 +193,7 @@ _rpm()
;;
-[Vy]*|--verify)
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W "$opts --root --dbpath --nodeps \
+ COMPREPLY=( $( compgen -W "$opts --root= --dbpath --nodeps \
--nogroup --nolinkto --nomode --nomtime --nordev --nouser \
--nofiles --noscripts --nomd5 --querytags --specfile \
--whatrequires --whatprovides" -- "$cur" ) )
@@ -216,13 +216,14 @@ _rpm()
;;
--import|--dbpath|--root)
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '--import --dbpath --root' \
+ COMPREPLY=( $( compgen -W '--import --dbpath --root=' \
-- "$cur" ) )
else
_filedir
fi
;;
esac
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
return 0
} &&
@@ -271,6 +272,7 @@ _rpmbuild()
if [[ $cur == -* ]]; then
COMPREPLY=( $( compgen -W "$( _parse_help "$1" )" -- "$cur" ) )
+ [[ $COMPREPLY == *= ]] && compopt -o nospace
return 0
fi