Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1398373 - bash-completion doesn't support config files outside /etc/mock
Summary: bash-completion doesn't support config files outside /etc/mock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-24 15:22 UTC by Jonathan Wakely
Modified: 2017-01-20 20:47 UTC (History)
6 users (show)

Fixed In Version: mock-1.3.3-1.fc25 mock-1.3.3-1.fc24 mock-1.3.3-1.el7 mock-1.3.3-1.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-06 07:51:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jonathan Wakely 2016-11-24 15:22:11 UTC
Description of problem:

The -r option of mock allows custom config files to be used, but the bash completion doesn't support that.

Version-Release number of selected component (if applicable):

mock-1.2.21-1.fc24.noarch

How reproducible:

Always.

Steps to Reproduce:
1. cp /etc/mock/default.cfg /tmp/mock.cfg
2. mock -r /tmp/mock<TAB>
3. Be disappoint.

Actual results:

Nothin'

Expected results:

Complete the filename.

Additional info:

If there was no custom completion for mock then this would work fine, because bash would just expand filenames as normal. So the custom completion actually makes things worse, by artificially limiting what can be used as an argument to the -r option.

Instead of only considering files in /etc/mock the completion should attempt to match the names of directories and files ending in .cfg

e.g. -r /tm<TAB> should complete to /tmp (because there could be some .cfg file under that directory)

e.g. -r /tmp/moc<TAB> should complete to /tmp/mock.cfg if that is a .cfg file

e.g. -r /etc/fsta<TAB> should not complete to /etc/fstab because that's not a .cfg file

e.g. -r ./<TAB><TAB> should show the names of all directories and all .cfg files under $PWD

Comment 1 Jonathan Wakely 2016-11-24 17:37:43 UTC
I've implemented this and created an upstream pull request to add it:

https://github.com/rpm-software-management/mock/pull/20

Comment 2 Miroslav Suchý 2016-12-30 14:46:55 UTC
Merged as 232e9b8

Comment 3 Fedora Update System 2017-01-01 12:25:10 UTC
mock-1.3.3-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1c15f1fddc

Comment 4 Fedora Update System 2017-01-01 12:25:42 UTC
mock-1.3.3-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5947ef9fd1

Comment 5 Fedora Update System 2017-01-01 12:26:14 UTC
mock-1.3.3-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-77cb570c74

Comment 6 Fedora Update System 2017-01-01 12:26:46 UTC
mock-1.3.3-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3b5bb282f4

Comment 7 Fedora Update System 2017-01-02 00:46:21 UTC
mock-1.3.3-1.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-1c15f1fddc

Comment 8 Fedora Update System 2017-01-02 00:48:06 UTC
mock-1.3.3-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-3b5bb282f4

Comment 9 Fedora Update System 2017-01-02 01:19:49 UTC
mock-1.3.3-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-77cb570c74

Comment 10 Fedora Update System 2017-01-02 01:50:09 UTC
mock-1.3.3-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5947ef9fd1

Comment 11 Fedora Update System 2017-01-06 07:51:50 UTC
mock-1.3.3-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2017-01-09 01:20:41 UTC
mock-1.3.3-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2017-01-16 17:21:46 UTC
mock-1.3.3-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-01-20 20:47:35 UTC
mock-1.3.3-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.


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