Elektrine lite

← Feed

@aartaka@merveilles.town

Post #1767871

2026-04-26 23:37 UTC

@ed1conf @tux0r the closing delimiter thing is not POSIX, but it enables newline insertion in g et al., and also works on OpenBSD ed and slewsys ed (didn’t test on Mac.) So I’m ready to live with this consensus “standard.”

Replies (2)

  • @ed1conf@bsd.network 2026-04-26 23:44

    @aartaka I quoted the POSIX bit that states it should be optional, so in compliant versions like BSD ed : s/pattern it works fine, and I use it all the time. But in GNU ed it complains: s/pattern ? h Missing pattern delimiter A personal pet peeve when that broke (around 1.14 IIRC :flan_angry: ) @tux0r

    Open ##1767872

  • @ed1conf@bsd.network 2026-04-26 23:57

    @aartaka I've heard the newline-in-g is the reason GNU made the change, but it works as expected in BSD ed without breakage: g/interesting/s/splithere/before\ after works fine, and if I want other commands, I can add them by explicitly including the delimiter: g/interesting/s/splithere/before\ after/\ -s/.*/[&] So GNU broke something specified by POSIX that I used regularly, in the name of fixing something that was never broken, and it makes me a spot grumpy :flan_XD: @tux0r

    Open ##1767874