3 ms·
I usually put a # before anything I paste into a terminal. Mostly because I sometimes get a newline at the end, but it will disarm this behavior too. I'm not su
by andrelaszlo 14y ago
I usually put a # before anything I paste into a terminal. Mostly because I sometimes get a newline at the end, but it will disarm this behavior too. I'm not sure if it works in all situations though. Edit: Won't work! Use a heredoc (<<paste) or the editor method suggested above instead.
- Qantourisc 14y agoYea until they sneak in a \n there. Might not help.
- deleted 14y ago[deleted]
- SoftwareMaven 14y agoGiven that there are newlines in the text being copied, the # won't necessarily save you. Much better to use a text editor.
- bluetooth 14y agoIt won't work in this situation. Multiple commands here are separated by newlines (like pressing enter on your keyboard) and putting # will only comment out the first one.
- andrelaszlo 14y agoYep, you're right. This one had a " char on the second line that made me confused. A heredoc will still work though, I should start doing that instead :)