File: lintian-brush.bash-completion

package info (click to toggle)
debian-codemods 0.171
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,312 kB
  • sloc: makefile: 888; xml: 119; python: 80; sh: 69; javascript: 3
file content (20 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Bash completion for lintian-brush

shopt -s progcomp
_lintian_brush ()
{
    local cur cmds cmdIdx cmd cmdOpts fixedWords i globalOpts
    local curOpt optEnums
    local IFS=$' \n'

    cur=${COMP_WORDS[COMP_CWORD]}

    fixers=$(lintian-brush --list-fixers 2>&1)
    globalOpts=(-h --no-update-changelog --update-changelog --version --list-fixers --list-tags --fixers-dir --verbose --directory --diff --dry-run --modern --identity --disable-net-access)

    # complete command name if we are not already past the command
    COMPREPLY=( $( compgen -W "$fixers ${globalOpts[*]}" -- $cur ) )
    return 0
}

complete -F _lintian_brush -o default lintian-brush