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

fix: Improve GNU sed fallback #421

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hyperupcall
Copy link
Contributor

@hyperupcall hyperupcall commented Aug 26, 2023

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.
  • Lint your code with ShellCheck.
  • 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.
  • Have a fixes #XX reference to the issue that this pull request fixes.

Code inspired by this comment, this PR fixes the sed command on BSD/Busybox, etc. platforms in which GNU sed is not used.

Unlike what some comments in the linked issue suggests, the approach of exporting the function so todotxt add-ons can automatically use the fix was not done. This is because that would be a breaking change and there is no way we can guarantee that the assumptions of this sed() function hold true for all plugin code.

How to test:

make test

Closes #168

@hyperupcall hyperupcall changed the title fix: Improve fallback when using sed fix: Improve GNU sed fallback Aug 26, 2023
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.

Inline mode not supported by NetBSD's sed
1 participant