From what I tried, it seems that I can not reproduce your issue of joining short lines. The text gets pasted or inserted always with the newlines.
Pasting the clipboard with Ctrl-V works, pasting the selection with the middle mouse button works too.
But your actual problem to solve may* be to paste a section of text as a citation, keeping the line formating.
To handle that case, there is a secial variant of pastin in thunderbird to do just that: In the "Edit" menu, or the context menu, there is "Paste as Quotation". That pastes lines prefixed with >
, and leaves the line breaks alone.
The text pasted is the content of the clipboard. In X, there are multiple buffers for cut and paste. Normally only two, "clipboard" and "primary" are used.
Your command
xclip test.txt
Puts the content of test.txt
into the "primary".
If you want to directly paste it as quotation, you can modify the command to put the text into the clipboard:
xclip -selection clipboard test.txt
*) It's an interpretation of the question and may be not the case - I see that the question is technically asking why the new lines are lost, not how to change that.
a b
output. Is this a mouse action or a keyboard shortcut (e.g., Ctrl+V), or are you talking about runningxclip
to paste the clipboard? Are you using a command likeecho `xclip`
orecho $(xclip)
? If you are, try adding quotes:echo "$(xclip)"
. – G-Man Says 'Reinstate Monica' Oct 24 '14 at 20:43