summaryrefslogtreecommitdiffstats
path: root/completions/uscan
blob: e82f6257661dd44d199d875b1d027e08f6bd4dd0 (plain)
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
# uscan completion                                         -*- shell-script -*-

_comp_cmd_uscan()
{
    local cur prev words cword was_split comp_args
    _comp_initialize -s -- "$@" || return

    case $prev in
        --package)
            _comp_compgen -x apt-cache sources
            return
            ;;
        --watchfile)
            _comp_compgen_filedir
            return
            ;;
        --destdir)
            _comp_compgen_filedir -d
            return
            ;;
        --timeout | --upstream-version | --download-version | \
            --check-dirname-level | --check-dirname-regex)
            COMPREPLY=()
            return
            ;;
    esac

    [[ $was_split ]] && return

    _comp_compgen_help
} &&
    complete -F _comp_cmd_uscan uscan

# ex: filetype=sh