I don't think this is dangerous enough to justify this. Quothe the HIG:
Use a default button only if the user’s most likely action is harmless. Make the default button represent the action that the user is most likely to perform if that action isn’t potentially dangerous. Users sometimes press Return merely to dismiss a dialog, without reading its content, so it’s crucial to ensure that the default button performs a harmless action.
Don’t use a default button if the user’s most likely action is dangerous. An example of a dangerous action is one that causes a loss of user data. When there is no default button, pressing Return or Enter has no effect; the user must explicitly click a button to dismiss the dialog. This guideline protects users from accidentally damaging their work by pressing Return or Enter without fully understanding the dialog’s message. You can consider using a safe default button, such as Cancel, or not using a default button at all.
It's arguably justifiable to not have a default at all, but it would just be so annoying!
I did fat-finger my return key, which surprised me, and prompted me to create this issue. I found out my shell doesn't seem to run commands ending in newlines anyways, so it actually didn't matter for me after all. I appreciate the HIG quote, but I don't think it applies here.
For users that trigger this popup all the time, and have shells that do execute on trailing newlines unlike mine, then I imagine they hit "Cancel" to go back and fix their clipboard far more often than they hit "Paste".
For users that always hit "Paste" ad nauseam, they probably have set their preferred default behavior using the "Remember my choice" checkbox.
For uber-paranoid users, I think they would probably prefer the default of "Cancel", but "Paste Without Newline" is definitely a best compromise.
The final point to consider is that users new to the command-line may not understand the implications of the popup. So, setting the default to "Cancel" would send a much clearer message about the fact that Something Bad may happen if they proceed. Here again, "Paste Without Newline" is probably a best compromise because it conveys this important sentiment.
So my vote is for setting the default to "Paste Without Newline".
OK to paste n lines? (note: not at the shell prompt)
OK to paste one line ending in a newline at the shell prompt?
OK to paste one line ending in a newline? (note: not at the shell prompt)
I think the proposal is to change 3 and 4. I have to think this over. It's definitely safer; there is possible annoyance but given that the dialog itself is annoying it's not a big increase.