yum: Complete on filenames when $cur contains /

For a long time "yum install" has accepted filenames as input and will
do the same thing that "yum localinstall" does.  Many users no longer
bother using localinstall and then find that they cannot complete a
pathname with yum install.  Similarly, deplist, update, and upgrade
accept filenames.
master
Todd Zullinger 2009-04-01 15:56:09 -04:00 committed by Ville Skyttä
parent 2abfb8c111
commit 72f2b0cb1c
2 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,10 @@ bash-completion (1.x)
completions.
* Add chkconfig --override and resetpriorities completions.
[ Todd Zullinger ]
* Make yum complete on filenames after install, deplist, update and upgrade
when the following argument contains a slash.
-- David Paleino <d.paleino@gmail.com> Wed, 25 Mar 2009 23:18:24 +0100
bash-completion (1.0)

View File

@ -43,6 +43,10 @@ _yum()
done
if [ -n "$special" ]; then
if [[ "$cur" == */* && "$special" == @(deplist|install|update|upgrade) ]]; then
_filedir rpm
return 0
fi
case $special in
install)
_yum_list available