contrib: bash: completion.bash: complete option values

pull/343/head
Asbjørn Apeland 2020-10-15 00:20:41 +02:00
parent ac323e8b4b
commit ae67a670f0
1 changed files with 25 additions and 0 deletions

View File

@ -3,6 +3,31 @@ _btrbk()
local cur prev words cword split
_init_completion -s || return
case "$prev" in
'-c' | '--config')
_filedir
return
;;
'--exclude')
return
;;
'-l' | '--loglevel')
COMPREPLY=($(compgen -W 'error warn info debug trace' -- "$cur"))
return
;;
'--format')
COMPREPLY=($(compgen -W 'table long raw' -- "$cur"))
return
;;
'--lockfile')
_filedir
return
;;
'--override')
return
;;
esac
$split && return
if [[ $cur == -* ]]; then