Pasting to terminal strips out line breaks. Intended?
When I copy something like
echo foo
echo bar
I paste and end up with
echo fooecho bar
Is this a bug?
Good question. After looking into the code, I can tell you it's a feature of hterm (the terminal emulation system we use: they replace all "\n" with "\r" and strip all control sequences). The command pbpaste does not do this translation.
I can see cases where this is useful, and cases where it is annoying. I need to think about it.
Interesting. I thought I was missing something obvious. I believe it may be best to go with what's the most commonly expected.
My personal favorite is when a terminal pops up a screen showing what it's about to paste with bonus ability to edit it 😃
Thanks for looking into it.