Skip to content
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

ENH: Enable file completion for add-on actions via _todo_file{1,2,3}_actions #270

Merged
merged 4 commits into from
Mar 30, 2020

Conversation

inkarkat
Copy link
Member

@inkarkat inkarkat commented Feb 8, 2019

Before submitting a pull request, please make sure the following is done:

  • Fork the repository and create your branch from master.
  • If you've added code that should be tested, add tests!
  • Ensure the test suite passes.
  • Format your code with ShellCheck. The completion didn't pass beforehand, the patch doesn't change the situation.
  • Include a human-readable description of what the pull request is trying to accomplish.
  • Steps for the reviewer(s) on how they can manually QA the changes. Automated test exists.
  • Have a fixes #XX reference to the issue that this pull request fixes. Addresses the issue raised in Bash completion with add on actions #269

…r actions taking a SRC argument

Making it consistent with the test for MOVE_COMMAND_PATTERN, and allowing to extend the pattern with custom actions in the future.
So that additional (custom) add-on actions can be configured in the future.
…actions

Allowing completion of todo files directly after the add-on action (1), with one (2) / two (3) arguments in between. This should handle most cases.

In order to configure the add-on completion, the corresponding configuration variable has to be defined in the user's shell (e.g. via ~/.bashrc):
_todo_file1_actions='myaction|anotheraction'
@inkarkat inkarkat requested a review from karbassi March 17, 2019 14:09
todo_completion Outdated Show resolved Hide resolved
@karbassi
Copy link
Member

@inkarkat if you could resolve the conflict and see if tests pass, maybe we can merge this.

@inkarkat
Copy link
Member Author

@karbassi Alright, merged in the indentation changes. Tests pass.

@karbassi karbassi merged commit 177432e into todotxt:master Mar 30, 2020
@inkarkat inkarkat deleted the enh-completion-files branch March 31, 2020 07:39
wwalker pushed a commit to wwalker/todo.txt-cli that referenced this pull request Sep 19, 2021
…actions (todotxt#270)

* Refactoring: Use regular expression match instead of case globbing for actions taking a SRC argument

Making it consistent with the test for MOVE_COMMAND_PATTERN, and allowing to extend the pattern with custom actions in the future.

* Refactoring: Move the anchoring and grouping out of MOVE_COMMAND_PATTERN

So that additional (custom) add-on actions can be configured in the future.

* ENH: Enable file completion for add-on actions via _todo_file{1,2,3}_actions

Allowing completion of todo files directly after the add-on action (1), with one (2) / two (3) arguments in between. This should handle most cases.

In order to configure the add-on completion, the corresponding configuration variable has to be defined in the user's shell (e.g. via ~/.bashrc):
_todo_file1_actions='myaction|anotheraction'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants