File tree 2 files changed +9
-5
lines changed
2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ _notes_complete_notes() {
21
21
}
22
22
23
23
_notes_complete_commands () {
24
- local valid_commands=" new find grep open ls rm cat"
24
+ local valid_commands=" new find grep open ls rm cat search "
25
25
COMPREPLY=($( compgen -W " ${valid_commands} " -- " ${1} " ) )
26
26
}
27
27
@@ -34,18 +34,21 @@ _notes()
34
34
35
35
if [[ $COMP_CWORD -gt 1 ]]; then
36
36
case " ${COMP_WORDS[1]} " in
37
- new)
37
+ new|n )
38
38
_notes_complete_notes " $cur "
39
39
;;
40
- find)
40
+ find|f )
41
41
_notes_complete_notes " $cur "
42
42
;;
43
43
grep)
44
44
;;
45
- open)
45
+ open|o )
46
46
_notes_complete_notes " $cur "
47
47
;;
48
- cat)
48
+ cat|c)
49
+ _notes_complete_notes " $cur "
50
+ ;;
51
+ ls)
49
52
_notes_complete_notes " $cur "
50
53
;;
51
54
esac
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ teardown() {
21
21
assert_contains " open" " ${COMPREPLY[@]} "
22
22
assert_contains " ls" " ${COMPREPLY[@]} "
23
23
assert_contains " rm" " ${COMPREPLY[@]} "
24
+ assert_contains " search" " ${COMPREPLY[@]} "
24
25
}
25
26
26
27
@test " Should show matching note when found" {
You can’t perform that action at this time.
0 commit comments