File: dh-make.bash-completion

package info (click to toggle)
dh-make 2.202503
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 384 kB
  • sloc: python: 1,022; sh: 80; makefile: 11
file content (49 lines) | stat: -rw-r--r-- 1,467 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# /usr/share/bash-completion/completions/dh_make
# Bash command completion for 'dh_make(1)'.
#

_dh-make()
{
    local cur prev options

    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}
    options='-a --addmissing -c --copyright --copyrightfile -d --defaultless\
             --docs -e --email -f --file -n --native -o --overlay\
             -p --packagename -t --templates -y --yes\
             --createorig --with-emacs -C --packageclass\
             -s --single -i --indep -l --library --python\
             -h --help -v --version'

    package_class="s i l p"
    package_license="apache artistic bsd gpl gpl2 gpl3 isc lgpl lgpl2 lgpl3\
                     expat custom"
    case $prev in
        -c | --copyright)
            COMPREPLY=( $( compgen -W "$package_license") )
            ;;
        -C | --packageclass)
            COMPREPLY=( $( compgen -W "$package_class" ) )
            ;;
        --copyrightfile | -o | --overlay | -t | --templates)
            COMPREPLY=( $( compgen -o "dirnames") )
            ;;
        -f | --file)
            COMPREPLY=( $( compgen -o "filenames") )
            ;;
        -e | --email | -p | --packagename)
            ;;
        *)
            COMPREPLY=( $(
                    compgen -W "$options" | grep "^$cur"
                ) )
            ;;
    esac

    return 0

}
complete -F _dh-make dh_make
#
# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 :