View | Details | Raw Unified | Return to bug 27839
Collapse All | Expand All

(-)a/debian/koha-common.bash-completion (-1 / +38 lines)
Lines 295-300 _koha-zebra() Link Here
295
}
295
}
296
complete -F _koha-zebra koha-zebra
296
complete -F _koha-zebra koha-zebra
297
297
298
299
_koha-worker()
300
{
301
    local cur opts substract
302
303
    COMPREPLY=()
304
    _get_comp_words_by_ref cur
305
    opts="--start --stop --restart --status --quiet -q --help -h"
306
307
    # Build a list of the already used option switches
308
    for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
309
        if [[ ${COMP_WORDS[i]} == -* ]]; then
310
            case ${COMP_WORDS[i]} in
311
                --start) _koha_list_cmd ; return 0 ;;
312
                 --stop) _koha_list_cmd ; return 0 ;;
313
              --restart) _koha_list_cmd ; return 0 ;;
314
               --status) _koha_list_cmd ; return 0 ;;
315
                 --help) COMPREPLY=() ; return 0 ;; # no more completions
316
                     -h) COMPREPLY=() ; return 0 ;; # no more completions
317
                --quiet) # filter the other quiet switches and go on
318
                    substract="$substract -e -q"; ;;
319
                -q)      # filter the other quiet switches and go on
320
                    substract="$substract -e --quiet"; ;;
321
            esac
322
            substract="$substract -e ${COMP_WORDS[i]}"
323
        fi
324
    done
325
326
    if [[ "$substract" != "" ]]; then
327
        opts=$( echo $opts | sed -e 's/ /\n/g'  | grep -v -x $substract )
328
    fi
329
330
    COMPREPLY=( $(compgen -W "$opts" -- $cur ) )
331
332
    return 0
333
}
334
complete -F _koha-worker koha-worker
335
298
_koha-sip()
336
_koha-sip()
299
{
337
{
300
    local cur opts substract
338
    local cur opts substract
301
- 

Return to bug 27839