File: licensecheck.bash_completion

package info (click to toggle)
licensecheck 3.3.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 652 kB
  • sloc: perl: 657; cpp: 275; ansic: 186; ruby: 21; makefile: 9; sh: 1
file content (40 lines) | stat: -rw-r--r-- 1,124 bytes parent folder | download | duplicates (6)
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
# /usr/share/bash-completion/completions/licensecheck
# Bash command completion for ‘licensecheck(1)’.
# Documentation: ‘bash(1)’, section “Programmable Completion”.

# Copyright © 2015, Nicholas Bamber <nicholas@periapt.co.uk>

_licensecheck()
{
    local cur prev words cword i _options special _prefix
    _init_completion || return

    case $prev in
        --tail)
            COMPREPLY=( $( compgen -W '0 1000 2000 3000' -- "$cur" ) )
            return 0
            ;;
        --lines)
            COMPREPLY=( $( compgen -W '120 200 300 400' -- "$cur" ) )
            return 0
            ;;
    esac

    if [[ "$cur" == -* ]]; then
        _options='--verbose --no-verbose --lines --ignore --recursive --tail --check --copyright --machine --skipped'
        COMPREPLY=( $( compgen -W "${_options}" -- "$cur" ) )
    else
        COMPREPLY=( $( compgen -o filenames -f -- "$cur" ) )
    fi

    return 0
} &&
complete -F _licensecheck licensecheck


# Local variables:
# coding: utf-8
# mode: shell-script
# indent-tabs-mode: nil
# End:
# vim: fileencoding=utf-8 filetype=sh expandtabs shiftwidth=4 :