Bug 14714

Summary: koha-mysql tab-completion in bash
Product: Koha Reporter: Tomás Cohen Arazi (tcohen) <tomascohen>
Component: Command-line UtilitiesAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: nick, robin, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 12372    
Bug Blocks: 14727    
Attachments: Bug 14714: Add tab-completion to koha-mysql command
[SIGNED OFF] Bug 14714: Add tab-completion to koha-mysql command
[PASSED QA] Bug 14714: Add tab-completion to koha-mysql command

Description Tomás Cohen Arazi (tcohen) 2015-08-24 18:43:21 UTC
The koha-mysql script lacks tab-completion in bash which would be handy. It should complete using only one valid instance name.
Comment 1 Tomás Cohen Arazi (tcohen) 2015-08-24 18:47:56 UTC Comment hidden (obsolete)
Comment 2 Nick Clemens (kidclamp) 2015-08-24 20:04:30 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall (khall) 2015-08-25 14:57:32 UTC
Created attachment 41928 [details] [review]
[PASSED QA] Bug 14714: Add tab-completion to koha-mysql command

This patch introduces tab-completion in bash to the koha-mysql
command. It completes using valid instance names. It stops completing
once an instance name is chosen (i.e. it respects the fact that
koha-mysql accepts only one instance name as parameter).

To test:
- Have a packages install (kohadevbox works)
- Run:
  $ . debian/koha-common.bash-completion
- Type
  koha-mysql <tab>
=> SUCCESS: You are prompted valid instance names for completion.
- Sign off :-D

Signed-off-by: Nick Clemens <nick@quecheelibrary.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2015-08-26 14:12:10 UTC
Patch pushed to master.