* Handle missing EOL in todo.txt This can happen easily with certain editors (such as Mousepad) that do not automatically add a newline character at the end of a file. In _addto(), ensure a trailing newline via sed (taken from https://unix.stackexchange.com/a/31955/18876). Fixes #294 * Tests: Add basic coverage of move * Handle missing EOL in todo.txt for move, too This can happen easily with certain editors (such as Mousepad) that do not automatically add a newline character at the end of a file. * Refactoring: Extract fixMissingEndOfLine() * FIX: Compatibility: sed \+ multi not supported on MacOS Use the POSIX \{1,\} instead. Co-authored-by: Ali Karbassi <ali@karbassi.com>
1.9 KiB
Executable File
1.9 KiB
Executable File