3 ms·
zsh actually detects pastes into the terminal and doesn't submit the commands on newlines. This way you see the full command and have to hit enter yourself to r
by kevincox 10y ago
zsh actually detects pastes into the terminal and doesn't submit the commands on newlines. This way you see the full command and have to hit enter yourself to run it.
It isn't perfect because people could try to obscure the command but in general it makes me a lot happier to paste commands into my terminal.
- lgas 10y agoThis was one of the first things that made me fall in love with zsh.
- bdcravens 10y agoI must be doing something wrong, because I copy and paste multiple lines all the time into zsh (ohmyzsh on iTerm) and it will execute all but the last line (which generally doesn't have a new line on it)
- kevincox 10y agoMaybe your terminal doesn't indicate pasted content properly. I'm using gnome-terminal and it works flawlessly.
- takluyver 10y agoThis. I'd argue that the issue here is more with terminals and shells than web browsers: paste shouldn't immediately start executing something. The technology to not do so has been around for years - it's called bracketed paste: https://cirw.in/blog/bracketed-paste https://cirw.in/blog/bracketed-paste