summaryrefslogtreecommitdiff
path: root/completions/_yum
diff options
context:
space:
mode:
Diffstat (limited to 'completions/_yum')
-rw-r--r--completions/_yum41
1 files changed, 20 insertions, 21 deletions
diff --git a/completions/_yum b/completions/_yum
index f3a104bd..d5e06eca 100644
--- a/completions/_yum
+++ b/completions/_yum
@@ -5,16 +5,16 @@
_yum_list()
{
- if [[ "$1" == all ]] ; then
+ if [[ "$1" == all ]]; then
# Try to strip in between headings like "Available Packages"
# This will obviously only work for English :P
- COMPREPLY=( $( yum -d 0 -C list $1 "$cur*" 2>/dev/null | \
+ COMPREPLY=( $(yum -d 0 -C list $1 "$cur*" 2>/dev/null | \
command sed -ne '/^Available /d' -e '/^Installed /d' -e '/^Updated /d' \
- -e 's/[[:space:]].*//p' ) )
+ -e 's/[[:space:]].*//p') )
else
# Drop first line (e.g. "Updated Packages")
- COMPREPLY=( $( yum -d 0 -C list $1 "$cur*" 2>/dev/null | \
- command sed -ne 1d -e 's/[[:space:]].*//p' ) )
+ COMPREPLY=( $(yum -d 0 -C list $1 "$cur*" 2>/dev/null | \
+ command sed -ne 1d -e 's/[[:space:]].*//p') )
fi
}
@@ -75,22 +75,22 @@ _yum()
case $prev in
list)
- COMPREPLY=( $( compgen -W 'all available updates installed extras
- obsoletes recent' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'all available updates installed extras
+ obsoletes recent' -- "$cur") )
;;
clean)
- COMPREPLY=( $( compgen -W 'packages headers metadata cache dbcache
- all' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'packages headers metadata cache dbcache
+ all' -- "$cur") )
;;
repolist)
- COMPREPLY=( $( compgen -W 'all enabled disabled' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'all enabled disabled' -- "$cur") )
;;
localinstall|localupdate)
# TODO: should not match *src.rpm
_filedir rpm
;;
-d|-e)
- COMPREPLY=( $( compgen -W '{0..10}' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '{0..10}' -- "$cur") )
;;
-c)
_filedir
@@ -99,21 +99,20 @@ _yum()
_filedir -d
;;
--enablerepo)
- COMPREPLY=( $( compgen -W '$( _yum_repolist disabled )' \
- -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_yum_repolist disabled)' -- "$cur") )
;;
--disablerepo)
- COMPREPLY=( $( compgen -W '$( _yum_repolist enabled )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_yum_repolist enabled)' -- "$cur") )
;;
--disableexcludes)
- COMPREPLY=( $( compgen -W '$( _yum_repolist all ) all main' \
- -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_yum_repolist all) all main' \
+ -- "$cur") )
;;
--enableplugin|--disableplugin)
- COMPREPLY=( $( compgen -W '$( _yum_plugins )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_yum_plugins)' -- "$cur") )
;;
--color)
- COMPREPLY=( $( compgen -W 'always auto never' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'always auto never' -- "$cur") )
;;
-R|-x|--exclude)
# argument required but no completions available
@@ -124,18 +123,18 @@ _yum()
return
;;
*)
- COMPREPLY=( $( compgen -W 'install update check-update upgrade
+ COMPREPLY=( $(compgen -W 'install update check-update upgrade
remove erase list info provides whatprovides clean makecache
groupinstall groupupdate grouplist groupremove groupinfo
search shell resolvedep localinstall localupdate deplist
- repolist help' -- "$cur" ) )
+ repolist help' -- "$cur") )
;;
esac
$split && return
if [[ "$cur" == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
[[ $COMPREPLY == *= ]] && compopt -o nospace
fi
} &&