Bug 14714 - koha-mysql tab-completion in bash
Summary: koha-mysql tab-completion in bash
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Command-line Utilities (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Tomás Cohen Arazi (tcohen)
QA Contact: Testopia
URL:
Keywords:
Depends on: 12372
Blocks: 14727
  Show dependency treegraph
 
Reported: 2015-08-24 18:43 UTC by Tomás Cohen Arazi (tcohen)
Modified: 2016-12-05 21:22 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14714: Add tab-completion to koha-mysql command (1.69 KB, patch)
2015-08-24 18:47 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
[SIGNED OFF] Bug 14714: Add tab-completion to koha-mysql command (1.76 KB, patch)
2015-08-24 20:04 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
[PASSED QA] Bug 14714: Add tab-completion to koha-mysql command (1.83 KB, patch)
2015-08-25 14:57 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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.