-
Notifications
You must be signed in to change notification settings - Fork 715
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
Allow parameters for todo.sh default action #407
Open
chrysle
wants to merge
7
commits into
todotxt:master
Choose a base branch
from
chrysle:allow-params-default-action
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Apr 8, 2015
-
Configuration menu - View commit details
-
Copy full SHA for 9b46037 - Browse repository at this point
Copy the full SHA 9b46037View commit details
Commits on Mar 6, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c958319 - Browse repository at this point
Copy the full SHA c958319View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b04315 - Browse repository at this point
Copy the full SHA 7b04315View commit details
Commits on Apr 3, 2023
-
Actually test (and fix) that the default action parameter is received…
… by the action The foo2 action needs to print its parameters (minus the first which is the action name, instead of hard-coding "foo" if no parameters are passed (which also is broken because the $# is already expanded in the here-doc)), and the test needs to include "foo" (instead of "bar") to match the (reused) expected output.
Configuration menu - View commit details
-
Copy full SHA for 6cc8217 - Browse repository at this point
Copy the full SHA 6cc8217View commit details
Commits on Apr 4, 2023
-
Also handle special characters (that need escaping) in the default ac…
…tion Spaces, quotes, $, and other special shell characters need to be escaped inside the TODOTXT_DEFAULT_ACTION, and consequently eval() used to parse that back into individual arguments.
Configuration menu - View commit details
-
Copy full SHA for 3ed6b48 - Browse repository at this point
Copy the full SHA 3ed6b48View commit details -
FIX: Default action with arguments does not consider built-in commands
Only $TODO_ACTIONS_DIR/$action, not even the $TODO_ACTIONS_DIR/$action/$action variant. A totally different approach is needed: Instead of parsing off the first argument and treating that as the custom action, do a recursive invocation with the default action parsed as a command-line. A new isDefaultAction flag is needed so that we only do this when the default action actually applies (otherwise, strange invocations like todo.sh "add +project here" would also be possible). The condition for non-empty $TODOTXT_DEFAULT_ACTION avoids an endless loop.
Configuration menu - View commit details
-
Copy full SHA for 0532485 - Browse repository at this point
Copy the full SHA 0532485View commit details -
Configuration menu - View commit details
-
Copy full SHA for e71eb46 - Browse repository at this point
Copy the full SHA e71eb46View commit details
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.