-
Notifications
You must be signed in to change notification settings - Fork 713
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
todo.sh replace using STDIN: remove priority prefix #386
Conversation
This helps new users to not mistakenly retain or change priority
So that any combination of priority / date entered in the replacement will replace the corresponding original ones, but if they are left out, the original ones will be kept. In essence, omitted stuff will be kept, added stuff will override, only deletion of existing stuff is not possible (but this is replace, after all). Fixes todotxt#386
Good catch! The duplicated priority indeed is a bug. I think that ignoring an entered priority is the wrong solution; instead, that priority should replace an existing one, like with dates. You unfortunately did not add any new tests that show the new behavior (and instead deleted and then restored an existing test, and added other unrelated stuff in the PR - please do separate submittals in the future!) In #387, I've reworked the replacement algorithm to do a pull merge of priority + date (and added tests to show the new behavior). How do you like that? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approach questionable; no tests added; unrelated changes.
Regarding Regarding |
Thanks for reviewing my code. Regarding the removal of the dummy action for test skips, to put it simply, the test above supposedly produces a side-effect (remove Regarding the editor-specific settings, I think your argument is valid. I'll take a look at your PR. Meanwhile, may I ask how do you include the specific commit into these comments (like e4608d9 (#386)) |
Hi @inkarkat, my changes are only related to the interface given to the STDIN and are consistent with the behavior of the command. Hence, it is hard to test for what is given from Before making these changes, I have also considered whether to change the behavior of In all honesty, I prefer your changes in #387 a lot better than the current behavior. |
Ah, I understand the problem now. Well spotted, thank you! I used to use Cygwin, but have switched to Ubuntu a long time ago; unfortunately, we still don't have a CI build on Cygwin (and embarassingly, the MacOS builds have been broken for a long time (@karbassi - any updates here?)), so this hasn't been noticed. I've taken your commit, added some explanation and a small refactoring on top, and separately submitted that as #388. |
Oh, that's just GitHub magic. On the /Commits\ tab on this PR, you just copy the URL to a particular commit. |
Great, thank you! If @karbassi agrees, we'll incorporate that extension of the behavior then. With your Cygwin test fix in a separate PR (#388), there's then nothing left to be handled here, so I'm closing this PR. Thanks for your bug report, fix, and explanations; I hope you'll enjoy |
Changes
todo.sh replace <ID>
with stdin inputt8010-listaddons.sh
Previously
The portion surrounded by
{}
is the initial input providedAfter
Before submitting a pull request, please make sure the following is done:
master
.fixes #XX
reference to the issue that this pull request fixes.