completion: Update completion for new bash-it update

Also fix the update completion test
pull/1626/head
Noah Gorny 2020-06-22 16:19:52 +03:00
parent 96295e92a5
commit 1bdcacf242
2 changed files with 8 additions and 3 deletions

View File

@ -87,7 +87,12 @@ _bash-it-comp()
COMPREPLY=( $(compgen -W "${doctor_args}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${doctor_args}" -- ${cur}) )
return 0 return 0
;; ;;
migrate | reload | search | update | version) update)
local update_args="stable dev"
COMPREPLY=( $(compgen -W "${update_args}" -- ${cur}) )
return 0
;;
migrate | reload | search | version)
return 0 return 0
;; ;;
enable | disable) enable | disable)

View File

@ -58,9 +58,9 @@ function __check_completion () {
assert_line -n 0 "vagrant vault vim" assert_line -n 0 "vagrant vault vim"
} }
@test "completion bash-it: update - show no options" { @test "completion bash-it: update - show options" {
run __check_completion 'bash-it update ' run __check_completion 'bash-it update '
assert_line -n 0 "" assert_line -n 0 "stable dev"
} }
@test "completion bash-it: search - show no options" { @test "completion bash-it: search - show no options" {