You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> printf "a\nb\nc" | sed -n 'x;x;p;p'
> a
> a
> b
> b
> c
> cterm@term >
Note how c has no newline at the end and the terminal prompt becomes one with it.
Observed
> printf "a\nb\nc" | cargo run -p sed -- -n 'x;x;p;p'
> a
> a
> b
> b
> c
> c
> term@term:
The last c is newline terminated even without needing it. I believe the issue is due to the chomp when printing in processor.rs on the p pattern match. Basically, if its not newline terminated, we manually add a newline, however this should not apply to the last line (is that correct?)
Activity