This file is indexed.

/etc/bash_completion.d/rdiff-backup is in rdiff-backup 1.2.8-7.

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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# /etc/bash_completion.d/rdiff-backup - bash-completion for rdiff-backup
# 2008 Andreas Olsson <andreas@arrakis.se>
#
# Developed for 1.2.x but can be "ported" to older version by modifying the
# lists of available options.
#
# Besides supplying options it will also try to determine
# when it is suitible to complete what.
#
# Feel free to send comments or suggestions.

shopt -s extglob

_rdiff_backup ()
{
	local cur prev wfilearg wpatharg wnumarg wotherarg longopts shortopts options
	COMPREPLAY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	prev="${COMP_WORDS[COMP_CWORD-1]}"

	# These options will be completed by the path to a filename.
	wfilearg="--exclude-filelist|--exclude-globbing-filelist|--exclude-if-present|
		|--group-mapping-file|--include-filelist|--include-globbing-filelist|
		|--user-mapping-file"

	# These options will be completed by the path to a directory.
	wpatharg="--remote-tempdir|--restrict|--restrict-read-only|
		|--restrict-update-only|--tempdir"

	# These options will be completed by a number, from 0 to 9.
	wnumarg="--terminal-verbosity|--verbosity|-v"

	# These options requires a non-completable argument.
	# They won't be completed at all.
	wotherarg="--compare-at-time|--compare-full-at-time|--compare-hash-at-time|
		|--current-time|--exclude|--exclude-regexp|--include|--include-regexp|
		|--list-at-time|--list-changed-since|--max-file-size|--min-file-size|
		|--no-compression-regexp|-r|--restore-as-of|--remote-schema|
		|--remove-older-than|--verify-at-time"

	# Availible long options
	longopts="--backup-mode --calculate-average --carbonfile --check-destination-dir \
		--compare --compare-at-time --compare-full --compare-full-at-time \
		--compare-hash --compare-hash-at-time --create-full-path --current-time \
		--exclude --exclude-device-files --exclude-fifos --exclude-filelist \
		--exclude-filelist-stdin --exclude-globbing-filelist --exclude-globbing-filelist-stdin \
		--exclude-other-filesystems --exclude-regexp --exclude-special-files --exclude-sockets \
		--exclude-symbolic-links --exclude-if-present --force --group-mapping-file --include \
		--include-filelist --include-filelist-stdin --include-globbing-filelist \
		--include-globbing-filelist-stdin --include-regexp --include-special-files \
		--include-symbolic-links --list-at-time --list-changed-since --list-increments \
		--list-increment-sizes --max-file-size --min-file-size --never-drop-acls --no-acls \
		--no-carbonfile --no-compare-inode --no-compression --no-compression-regexp  --no-eas \
		--no-file-statistics --no-hard-links --null-separator --parsable-output  \
		--override-chars-to-quote --preserve-numerical-ids --print-statistics --restore-as-of \
		----remote-schema --remote-tempdir --remove-older-than --restrict \
		--restrict-read-only --restrict-update-only --ssh-no-compression --tempdir \
		--terminal-verbosity --test-server --user-mapping-file --verbosity --verify \
		--verify-at-time --version"

	# Availible short options
	shortopts="-b -l -r -v -V"

	options=${longopts}" "${shortopts}

	case "$prev" in
		@($wfilearg))
			_filedir
			return 0
			;;

		@($wpatharg))
			_filedir -d
			return 0
			;;

		@($wotherarg))
			return 0
			;;

		@($wnumarg))
			COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- $cur ) )
			return 0
			;;
	esac

	if [[ ${cur} == -* ]]
	then
		COMPREPLY=( $(compgen -W "${options}" -- ${cur}) )
		return 0
	else
		_filedir
		return 0
	fi
}

complete -F _rdiff_backup -o filenames rdiff-backup