/usr/share/bash-completion/completions/chdist is in devscripts 2.17.6+deb9u2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 50 51 52 53 54 55 56 57 58 59 60 | # /usr/share/bash-completion/completions/chdist
# Bash command completion for ‘chdist(1)’.
# Documentation: ‘bash(1)’, section “Programmable Completion”.
_chdist ()
{
local cur=$2 prev=$3
local options='--help -h --data-dir -d --arch -a'
local commands='create apt apt-get apt-cache apt-rdepends aptitude
src2bin bin2src
compare-packages compare-bin-packages
compare-versions compare-bin-versions
grep-dctrl-packages grep-dctrl-sources
list'
# Sync'd with buildd.debian.org on 2016-04-02:
local archs="all alpha amd64 arm64 armel armhf hppa hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 m68k mips mips64el mipsel powerpc powerpcspe ppc64 ppc64el s390 s390x sh4 sparc sparc64 x32"
local dists=$(ls ~/.chdist 2>/dev/null)
COMPREPLY=()
case "$prev" in
-@(-arch|a))
COMPREPLY=( $( compgen -W "$archs" -- $cur ) )
return 0
;;
-@(-data-dir|d))
_filedir
return 0
;;
-@(-help|h)|list)
return 0
;;
create|apt|apt-get|apt-cache|apt-rdepends|aptitude|src2bin|bin2src|compare-packages|compare-bin-packages|compare-versions|compare-bin-versions|grep-dctrl-packages|grep-dctrl-sources)
COMPREPLY=( $( compgen -W "$dists" -- $cur ) )
return 0
esac
if [[ "$cur" == -* ]]; then
# return one of the possible options
COMPREPLY=( $( compgen -W "$options" -- $cur ) )
else
# return one of the possible commands
COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
fi
return 0
}
complete -F _chdist chdist
# Local variables:
# coding: utf-8
# mode: shell-script
# indent-tabs-mode: nil
# End:
# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 :
|