/usr/share/bash-completion/completions/chdist is in devscripts 2.16.2ubuntu3.
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 | _chdist ()
{
local cur=$2 prev=$3
local options='--help -h --data-dir -d --arch -a'
local commands='create apt-get apt-cache apt-rdepends
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 and buildd.debian-ports.org on 2015-04-28:
local archs="amd64 arm64 armel armhf hurd-i386 i386 ia64 kfreebsd-amd64 kfreebsd-i386 mips mipsel powerpc ppc64el s390 s390x sparc \
alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32"
local dists=$(ls $HOME/.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-get|apt-cache|apt-rdepends|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
|