-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action argument for help to todo_completion.
Note that this is not perfect, as it only handles completing a single action after "help", but that should over the most important use case.
- Loading branch information
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# | ||
|
||
test_description='Bash help completion functionality | ||
This test checks todo_completion of actions for usage help. | ||
' | ||
. ./actions-test-lib.sh | ||
. ./test-lib.sh | ||
make_action "zany" | ||
make_action "aardvark" | ||
|
||
readonly ACTIONS='add a addto addm append app archive command del rm depri dp do help list ls listaddons listall lsa listcon lsc listfile lf listpri lsp listproj lsprj move mv prepend prep pri p replace report shorthelp' | ||
readonly ADDONS='aardvark zany' | ||
|
||
test_todo_completion 'all actions after help' 'todo.sh help ' "$ACTIONS $ADDONS" | ||
test_todo_completion 'all actions after command help' 'todo.sh command help ' "$ACTIONS $ADDONS" | ||
test_todo_completion 'actions beginning with a' 'todo.sh help a' 'add a addto addm append app archive aardvark' | ||
|
||
test_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters