In my experience copying from some programs preserves long lines. Copying from other programs breaks them at the wrap point. Once the text is cut into lines, pasting can't fix it. I'm not at my computer now so I can't give factual examples. I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.
> I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.
It depends on the terminal. Some will actually preserve the line breaks vs soft wraps. Those terminals will reflow the text when you resize the window.
But if you already have the file you might as well run something like `xclip <file` to copy its contents directly to the clipboard.
In my experience copying from some programs preserves long lines. Copying from other programs breaks them at the wrap point. Once the text is cut into lines, pasting can't fix it. I'm not at my computer now so I can't give factual examples. I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.
> I guess that copying from the output of cat file on a terminal is one of those unfortunate cases.
It depends on the terminal. Some will actually preserve the line breaks vs soft wraps. Those terminals will reflow the text when you resize the window.
But if you already have the file you might as well run something like `xclip <file` to copy its contents directly to the clipboard.
If it is that much code attach a file or github link to gist or PR.
That's too much friction - especially since managed users cannot even create Gists in GitHub Enterprise Cloud (ugh). https://docs.github.com/en/enterprise-cloud@latest/admin/man...
As for attaching a file, I'm usually screenshotting small amounts of code - usually of the ephemeral variety.