Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why sometimes when I paste a command on my bash prompt it gets executed even if I don't press Enter?

The command get executed without the need of pressing Enter. This can be dangerous sometimes...

Why is that and how can I prevent it?

like image 475
Alberto Zaccagni Avatar asked May 13 '09 09:05

Alberto Zaccagni


1 Answers

Because you paste new line character with it. It's sometimes can be useful, for example, you can copy/paste many commands (long multi-line scripts) at once.

Well, It has never occurred to me to prevent this particular behavior. It's normal and expected. WYPIWYG - what you paste is what you get.

like image 200
alex vasi Avatar answered Sep 30 '22 23:09

alex vasi