1# /usr/share/bash-completion/completions/plotchangelog
2# Bash command completion for ‘plotchangelog(1)’.
3# Documentation: ‘bash(1)’, section “Programmable Completion”.
4
5# Copyright © 2015, Nicholas Bamber <nicholas@periapt.co.uk>
6
7_plotchangelog()
8{
9    local cur prev words cword _options
10    _init_completion || return
11
12    _options='--linecount --bugcount --cumulative --no-version --no-maint --urgency --verbose'
13
14    if [[ $prev == plotchangelog ]]; then
15        _options+=' --no-conf'
16    fi
17
18    _options+=' '
19    _options+=$(find . -name changelog | sed -e's!\.\/!!' |  paste -s -d' ')
20
21    COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) )
22
23    return 0
24} &&
25complete -F _plotchangelog plotchangelog
26
27
28# Local variables:
29# coding: utf-8
30# mode: shell-script
31# indent-tabs-mode: nil
32# End:
33# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 :
34