Sometimes, when I paste things into Putty, it runs them automatically. Other times, it waits for me to his Enter before running the command. Why the erratic behavior?

link|improve this question

43% accept rate
feedback

2 Answers

In the first instance, you're pasting the command with a newline, which is getting sent to the terminal and is equivalent to ENTER.

In the second instance you've copied and pasted a command without a newline, so it is waiting for ENTER to run the command.

link|improve this answer
If I make extra-double sure to only copy the command up to the last character, will that stop the newline from being copied? – mattloaf1 Dec 12 '09 at 17:17
It will indeed. Copying and pasting is generally application specific on Windows, as they control access to the clipboard. So it can depend where you are copying from and what that does, but generally if you're quite careful about setting the marker just to the last character, and not further onto the end of the line (it's like an invisible line!) you normally get away with it. If you're not sure, I sometimes find selecting right to left instead of left to right can work – Phil Dec 12 '09 at 17:21
feedback

I would guess that you get a linefeed copied into the clipboard sometimes. To check if this is the case, try running clipbrd.exe or simply pasting the contents into your favorite control-char-displaying editor.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.