todotxt / todo.txt-cli

☑️ A simple and extensible shell script for managing your todo.txt file.
http://todotxt.org
GNU General Public License v3.0
5.55k stars 712 forks source link

fix: Improve GNU sed fallback #421

Open hyperupcall opened 1 year ago

hyperupcall commented 1 year ago

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

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