completion: Add bash-it doctor completion

Also fix the tests and add a new one
This commit is contained in:
Noah Gorny
2020-06-20 20:15:12 +03:00
parent 86824a93ed
commit 1e674643b3
2 changed files with 17 additions and 7 deletions

View File

@@ -65,7 +65,7 @@ _bash-it-comp()
prev="${COMP_WORDS[COMP_CWORD-1]}"
chose_opt="${COMP_WORDS[1]}"
file_type="${COMP_WORDS[2]}"
opts="disable enable help migrate reload search show update version"
opts="disable enable help migrate reload doctor search show update version"
case "${chose_opt}" in
show)
local show_args="aliases completions plugins"
@@ -82,6 +82,11 @@ _bash-it-comp()
return 0
fi
;;
doctor)
local doctor_args="errors warnings all"
COMPREPLY=( $(compgen -W "${doctor_args}" -- ${cur}) )
return 0
;;
migrate | reload | search | update | version)
return 0
;;