Bugzilla – Attachment 68627 Details for
Bug 17467
Introduce a single koha-zebra script to handle Zebra daemons for instances
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17467: Add tab-completion for koha-zebra
Bug-17467-Add-tab-completion-for-koha-zebra.patch (text/plain), 2.38 KB, created by
Nick Clemens (kidclamp)
on 2017-10-26 15:28:20 UTC
(
hide
)
Description:
Bug 17467: Add tab-completion for koha-zebra
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-10-26 15:28:20 UTC
Size:
2.38 KB
patch
obsolete
>From a1d1e424cb4c5267833881003c67bbe7147ee5c9 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Wed, 19 Oct 2016 15:54:52 -0300 >Subject: [PATCH] Bug 17467: Add tab-completion for koha-zebra > >This patch adds tab-completion for bash, for the koha-zebra script. > >To test: >- Run (on the vagrant user): > $ source kohaclone/debian/koha-common.bash-completion >- Run: > $ sudo koha-zebra -<TAB> > (<TAB> means press the tab key) >=> SUCCESS: Tab completion works as expected for the koha-zebra command. >- Sign off :-D > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > debian/koha-common.bash-completion | 37 +++++++++++++++++++++++++++++++++++++ > 1 file changed, 37 insertions(+) > >diff --git a/debian/koha-common.bash-completion b/debian/koha-common.bash-completion >index 637a56b..cb2f3a4 100644 >--- a/debian/koha-common.bash-completion >+++ b/debian/koha-common.bash-completion >@@ -271,6 +271,43 @@ _koha-indexer() > } > complete -F _koha-indexer koha-indexer > >+_koha-zebra() >+{ >+ local cur opts substract >+ >+ COMPREPLY=() >+ _get_comp_words_by_ref cur >+ opts="--start --stop --restart --status --quiet -q --help -h" >+ >+ # Build a list of the already used option switches >+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do >+ if [[ ${COMP_WORDS[i]} == -* ]]; then >+ case ${COMP_WORDS[i]} in >+ --start) _koha_list_cmd ; return 0 ;; >+ --stop) _koha_list_cmd ; return 0 ;; >+ --restart) _koha_list_cmd ; return 0 ;; >+ --status) _koha_list_cmd ; return 0 ;; >+ --help) COMPREPLY=() ; return 0 ;; #Â no more completions >+ -h) COMPREPLY=() ; return 0 ;; #Â no more completions >+ --quiet) #Â filter the other quiet switches and go on >+ substract="$substract -e -q"; ;; >+ -q) #Â filter the other quiet switches and go on >+ substract="$substract -e --quiet"; ;; >+ esac >+ substract="$substract -e ${COMP_WORDS[i]}" >+ fi >+ done >+ >+ if [[ "$substract" != "" ]]; then >+ opts=$( echo $opts | sed -e 's/ /\n/g' | grep -v -x $substract ) >+ fi >+ >+ COMPREPLY=( $(compgen -W "$opts" -- $cur ) ) >+ >+ return 0 >+} >+complete -F _koha-zebra koha-zebra >+ > # Local variables: > # mode: shell-script > # sh-basic-offset: 4 >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17467
:
56662
|
56663
|
56664
|
56665
|
56669
|
56693
|
58550
|
66420
|
66421
|
66422
|
66423
|
66424
|
66425
|
66426
|
68623
|
68624
|
68625
|
68626
| 68627 |
68628
|
68629