Skip to content

Commit 2a48554

Browse files
author
Noah Gorny
committed
completion: Update completion for new bash-it update
Also fix the update completion test
1 parent 8c4b349 commit 2a48554

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

completion/available/bash-it.completion.bash

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,12 @@ _bash-it-comp()
8787
COMPREPLY=( $(compgen -W "${doctor_args}" -- ${cur}) )
8888
return 0
8989
;;
90-
migrate | reload | search | update | version)
90+
update)
91+
local update_args="stable dev"
92+
COMPREPLY=( $(compgen -W "${update_args}" -- ${cur}) )
93+
return 0
94+
;;
95+
migrate | reload | search | version)
9196
return 0
9297
;;
9398
enable | disable)

test/completion/bash-it.completion.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ function __check_completion () {
5858
assert_line -n 0 "vagrant vault vim"
5959
}
6060

61-
@test "completion bash-it: update - show no options" {
61+
@test "completion bash-it: update - show options" {
6262
run __check_completion 'bash-it update '
63-
assert_line -n 0 ""
63+
assert_line -n 0 "stable dev"
6464
}
6565

6666
@test "completion bash-it: search - show no options" {

0 commit comments

Comments
 (0)