Bug 759224 - rpm -r does not complete
Summary: rpm -r does not complete
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash-completion
Version: 16
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-01 17:53 UTC by Jan Kratochvil
Modified: 2012-01-08 12:21 UTC (History)
3 users (show)

Fixed In Version: 1.99-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-08 12:21:58 UTC
Type: ---


Attachments (Terms of Use)
Fix. (356 bytes, patch)
2011-12-01 17:53 UTC, Jan Kratochvil
no flags Details | Diff

Description Jan Kratochvil 2011-12-01 17:53:46 UTC
Created attachment 539327 [details]
Fix.

bash-completion-1.3-6.fc16.noarch

Steps to Reproduce:
rpm -r /var/lib/mock/fedo<tab><tab>
... for some -i package.rpm

Actual results:
No completion.

Expected results:
Filename completion works.

Comment 1 Jan Kratochvil 2011-12-01 17:55:34 UTC
But maybe the fix is wrong.
rpm -i kernel-3.1.4-1.fc16.x86_6<tab><tab> works fine
(for a local file kernel-3.1.4-1.fc16.x86_64.rpm)
but even after the patch:
rpm -r /var/lib/mock/fedora-16-x86_64/root -i ker<tab><tab>
still does not work.

Comment 2 Ville Skyttä 2011-12-01 19:25:53 UTC
The fix is definitely correct, pushed upstream:
http://anonscm.debian.org/gitweb/?p=bash-completion/bash-completion.git;a=commitdiff;h=86d0395fc5efbeef9aad8cc27e84270f7c59faa1

Why the latter example still doesn't work is just because rpm is a pretty complex command to complete properly and there's lots of room for improvement.  Your example case would however work if given the other way around, i.e. "rpm -i ... -r ...".  As a rule of thumb, specifying the operation (-i, -U, -e etc) first, then additional options tends to result in best completion results at the moment.


Note You need to log in before you can comment on or make changes to this bug.