-
Notifications
You must be signed in to change notification settings - Fork 729
ENH: Enable file completion for add-on actions via _todo_file{1,2,3}_actions #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
79b7f56
Refactoring: Use regular expression match instead of case globbing fo…
inkarkat 1cca1ce
Refactoring: Move the anchoring and grouping out of MOVE_COMMAND_PATTERN
inkarkat dab8341
ENH: Enable file completion for add-on actions via _todo_file{1,2,3}_…
inkarkat ff59099
Merge remote-tracking branch 'upstream/master' into enh-completion-files
inkarkat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,28 @@ | ||
| #!/bin/bash | ||
| # | ||
|
|
||
| test_description='Bash add-on action file completion functionality | ||
|
|
||
| This test checks todo_completion of files for add-on actions that have file argument(s) configured | ||
| ' | ||
| . ./test-lib.sh | ||
|
|
||
| readonly FILES='done.txt report.txt todo.txt' | ||
| test_todo_completion 'nothing after unconfigured bar' 'todo.sh bar ' '' | ||
|
|
||
| _todo_file1_actions='foo|bar' | ||
| test_todo_completion 'all files after configured bar' 'todo.sh bar ' "$FILES" | ||
| test_todo_completion 'nothing after configured bar ITEM#' 'todo.sh bar 1 ' '' | ||
|
|
||
| _todo_file2_actions='baz' | ||
| test_todo_completion 'nothing after configured baz' 'todo.sh baz ' '' | ||
| test_todo_completion 'all files after configured baz ITEM#' 'todo.sh baz 1 ' "$FILES" | ||
| test_todo_completion 'nothing after configured baz ITEM# MORE' 'todo.sh baz 1 more ' '' | ||
|
|
||
| _todo_file3_actions='biz' | ||
| test_todo_completion 'nothing after configured biz' 'todo.sh biz ' '' | ||
| test_todo_completion 'nothing after configured biz ITEM#' 'todo.sh biz 1 ' '' | ||
| test_todo_completion 'all files after configured biz ITEM# MORE' 'todo.sh biz 1 more ' "$FILES" | ||
| test_todo_completion 'nothing after configured biz ITEM# EVEN MORE' 'todo.sh biz 1 even more ' '' | ||
|
|
||
| test_done |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.