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.
This commit is contained in:
parent
2abfb8c111
commit
72f2b0cb1c
4
CHANGES
4
CHANGES
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user