ed: Restore newlines in match() - sbase - suckless unix tools
(HTM) git clone git://git.suckless.org/sbase
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 284e154a278134f910ba54e9a0b7cfac1d6748fe
(DIR) parent a45474cfbb2de4a16592bf4fa7e19345cab03c5c
(HTM) Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Mon, 8 Dec 2025 17:54:10 +0100
ed: Restore newlines in match()
Match was removing the trailing newline to fix some problems
in regex, but this modified the content of the line making
that the output file had embedded NUL characters (and obviously
no newlines).
Diffstat:
M tests/0008-ed.sh | 1 +
1 file changed, 1 insertion(+), 0 deletions(-)
---
(DIR) diff --git a/tests/0008-ed.sh b/tests/0008-ed.sh
@@ -8,6 +8,7 @@ trap 'rm -f $tmp' EXIT
trap 'rm -f $tmp; kill -KILL $$' HUP INT TERM
../ed <<EOF > /dev/null
+../ed -s <<EOF > /dev/null
0a
This is important
.