Bug 858248 - [RFE]: scl command should have bash completion. PATCH included.
Summary: [RFE]: scl command should have bash completion. PATCH included.
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: scl-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 858251
TreeView+ depends on / blocked
 
Reported: 2012-09-18 12:31 UTC by Miroslav Hradílek
Modified: 2013-07-02 23:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 858251 (view as bug list)
Environment:
Last Closed: 2012-09-21 10:40:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Proposed patch (1.15 KB, application/octet-stream)
2012-09-18 12:33 UTC, Miroslav Hradílek
no flags Details
Proposed patch v1.1 (1.16 KB, application/octet-stream)
2012-09-21 10:51 UTC, Miroslav Hradílek
no flags Details

Description Miroslav Hradílek 2012-09-18 12:31:38 UTC
Description of problem:

Utility scl is called on a regular basis and it is annoying to write everything by hand every time.

Expected results:

Bash completion should complete available scriptlets and collections automatically.

Comment 1 Miroslav Hradílek 2012-09-18 12:33:26 UTC
Created attachment 613999 [details]
Proposed patch

Also Patch added :)

Comment 2 Jindrich Novy 2012-09-21 09:45:22 UTC
Hi Miroslav, thanks for the autocompletion script!

Just a few points I noticed while using it for autocompletion:

$ scl -l
example
example123

$ scl enable <tab>

expands to:

$ scl enable example123-

which doesn't seem to be correct. The correct result should be:

$ scl enable example

turning to:

$ scl enable example123

after the next tab.

Could you please fix the completition script so that I can apply it upstream?

Thanks!

Comment 3 Jindrich Novy 2012-09-21 10:40:39 UTC
Ok, consulted that with Miroslav and did minor modifications. It is now comitted to upstream.

Comment 4 Miroslav Hradílek 2012-09-21 10:51:44 UTC
Created attachment 615376 [details]
Proposed patch v1.1

Nev version: Searching for collections in /etc/scl/prefixes now as proposed. Only installed collections should be listed this way.


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