File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ _notes_complete_notes() {
2121}
2222
2323_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 "
2525 COMPREPLY=($( compgen -W " ${valid_commands} " -- " ${1} " ) )
2626}
2727
@@ -34,18 +34,18 @@ _notes()
3434
3535 if [[ $COMP_CWORD -gt 1 ]]; then
3636 case " ${COMP_WORDS[1]} " in
37- new)
37+ new|n )
3838 _notes_complete_notes " $cur "
3939 ;;
40- find)
40+ find|f )
4141 _notes_complete_notes " $cur "
4242 ;;
4343 grep)
4444 ;;
45- open)
45+ open|o )
4646 _notes_complete_notes " $cur "
4747 ;;
48- cat)
48+ cat|c )
4949 _notes_complete_notes " $cur "
5050 ;;
5151 esac
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ teardown() {
2121 assert_contains " open" " ${COMPREPLY[@]} "
2222 assert_contains " ls" " ${COMPREPLY[@]} "
2323 assert_contains " rm" " ${COMPREPLY[@]} "
24+ assert_contains " search" " ${COMPREPLY[@]} "
2425}
2526
2627@test " Should show matching note when found" {
You can’t perform that action at this time.
0 commit comments