File: bash_completion.cowbuilder

package info (click to toggle)
cowdancer 0.47
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 696 kB
  • ctags: 179
  • sloc: ansic: 2,634; sh: 407; makefile: 116; cpp: 6; python: 4
file content (28 lines) | stat: -rw-r--r-- 730 bytes parent folder | download
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
# Debian GNU/Linux cowbuilder(1) completion
# Copyright 2007 Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>
#
# This script can be distributed under the same license as the
# cowdancer or bash packages.

have cowbuilder &&
_cowbuilder()
{
    local cur prev options

    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}
    options='--create --update --build --login --execute --dumpconfig'

    case $prev in
        --build)
            COMPREPLY=( $( compgen -o filenames -G "$cur*.dsc" ) )
            ;;
        *)
            COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
            ;;
    esac

    return 0
}
[ "$have" ] && complete -F _cowbuilder -o filenames cowbuilder