This file is indexed.

/etc/bash_completion.d/make_kpkg is in kernel-package 12.036+nmu3.

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
61
62
63
64
#-*- mode: shell-script;-*-

# Debian GNU/Linux make-kpkg(1) completion.
# Copyright 2002 "Dr. Rafael Sepulveda" <drs@gnulinux.org.mx>
#
have make-kpkg &&
_make_kpkg()
{
    local cur prev options paroptions special i
    
    #check if we are in a kernel directory.
    [[ -d "drivers" && -d "kernel" && -d "fs" && -d "include/linux" ]] || \
	return 0

    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}
    options="--added_modules --added-modules --added_patches --added-patches \
             --append_to_version --append-to-version --arch --arch_in_name \
             --arch-in-name binary build buildpackage --bzimage clean \
             --config configure --cross_compile --cross-compile debian \
             --help --initrd --overlay-dir kernel_doc kernel_headers kernel_image \
             kernel_source linux_doc linux_headers linux_image \
             linux_source libc-kheaders modules modules_clean modules_config \
             modules_image --noexec --pgpsign --stem --revision --rootcmd --subarch \
             --targets --uc --us --zimage"

    paroptions="$options"


    [[ $prev == '--config' ]] && \
	paroptions='config oldconfig silentoldconfig menuconfig xconfig'

    #exclude some options
    [[ "$DEBIAN_REVISION_MANDATORY" ]] ||\
	{ [[ -a "stamp-configure" ]] && paroptions=${paroptions/--revision}; }
    [[ "$ARCH_IN_NAME" ]] && paroptions=${paroptions//--arch[-_]in[-_]name}
    [[ "$CROSS_COMPILE" ]] && paroptions=${paroptions//--cross[-_]compile}
    [[ "$KPKG_ARCH" ]] && paroptions=${paroptions/--arch}
    [[ "$KPKG_SUBARCH" ]] && paroptions=${paroptions/--subarch}
    [[ "$KPKG_OVERLAY_DIR" ]] && paroptions=${paroptions/--overlay-dir}
    [[ $(grep CONFIG_BLK_DEV_INITRD .config 2>/dev/null \
        | cut -d= -f2) == "y" ]] && \
	[[ "$INITRD" == "YES" ]] && paroptions=${paroptions/--initrd}

    for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
	#we need to start and end every line with '|' so it can be recognized.
	if [[ ${COMP_WORDS[i]} == @(binary|build|buildpackage|clean|\
	    |configure|debian|kernel_doc|kernel_headers|kernel_image|\
	    |kernel_source|libc-kheaders|modules|modules_clean|\
	    |modules_config|modules_image|binary-indep|binary-arch|\
            |kernel-manual|kernel_manual|modules_clean) ]]; then
	    paroptions=$( echo $options | sed s/--[^\ ]*//g )
	    COMPREPLY=( $( compgen -W "$paroptions" | grep ^$cur ) )
	    return 0;
	fi
    done

    COMPREPLY=( $( compgen -W "$paroptions" | grep ^$cur ) )

    return 0

}
[ "$have" ] && complete -F _make_kpkg -o filenames make-kpkg