4
for i in "${COMP_WORDS}"; do
6
--profile|--profile-id|--config)
7
if [[ ${i} != -* ]]; then
8
opts="${opts} ${last} ${i}"
18
backintime$(_bit_extr_opts) --quiet --snapshots-list | awk '{print $2}'
23
local cur prev actions opts pw_cache_commands
25
cur="${COMP_WORDS[COMP_CWORD]}"
26
prev="${COMP_WORDS[COMP_CWORD-1]}"
27
prev2="${COMP_WORDS[COMP_CWORD-2]}"
28
prev3="${COMP_WORDS[COMP_CWORD-3]}"
29
opts="--profile --profile-id --keep-mount --quiet --config --checksum"
30
actions="--backup --backup-job --snapshots-path --snapshots-list --snapshots-list-path --last-snapshot --umount --benchmark-cipher --pw-cache --decode --remove --restore --version --license --help"
31
pw_cache_commands="start stop restart reload status"
33
if [[ "${prev2}" == "--restore" ]] && [[ ${prev} != -* ]] && [[ ${cur} != -* ]]; then
38
if [[ "${prev3}" == "--restore" ]] && [[ ${prev2} != -* ]] && [[ ${prev} != -* ]] && [[ ${cur} != -* ]]; then
39
COMPREPLY=( $(compgen -W "$(_bit_snapshots_list)" -- ${cur}) )
44
--config|--decode|--restore)
45
if [[ ${cur} != -* ]]; then
50
if [[ ${cur} != -* ]]; then
51
COMPREPLY=( $(compgen -W "${pw_cache_commands}" -- ${cur}) )
54
--remove|--remove-and-do-not-ask-again)
55
if [[ ${cur} != -* ]]; then
56
COMPREPLY=( $(compgen -W "$(_bit_snapshots_list)" -- ${cur}) )
61
if [[ ${cur} == -* ]] ; then
62
COMPREPLY=( $(compgen -W "${opts} ${actions}" -- ${cur}) )
67
complete -F _backintime backintime
68
complete -F _backintime backintime-qt4