To reproduce: printf '%s\n' hello '' world | sed -n -e 's/^//' -e '$!N' -e P -e D Expected output: hello world Actual output: hello h world
This is reproducible on -current. The output of GNU sed: $ printf '%s\n' hello '' world | gsed -n -e 's/^//' -e '$!N' -e P -e D hello world