News for hackers. Stuff that matters.

alexithymia

Re:Don't Copy Paste into a Shell on Friday October 16, 2020 @08:49PM (#24806538)
> I can paste newlines just fine in both alacritty and konsole, so I'm not sure what you mean.

That's strange. I tried copy-pasting the text on https://thejh.net/misc/website-terminal-copy-paste to Alacritty, and the newlines were replaced with semicolons. However, pasting newlines worked within vim in insert mode. It happens with or without bracketed paste mode on (using the "enable-bracketed-paste" option in ~/.inputrc). Same thing with Konsole.

> > A few terminals, despite having Bracketed Paste Mode, are vulnerable to escape injection. That's when the end-paste escape sequence is included in the paste content, and the terminal lets it pass through, causing the shell to think the paste ended.

I'm glad you mentioned this!

> With support for Bracketed Paste Mode, all that needs to be stripped from the pasted content is the end-paste escape sequence.

Alacritty strips the control sequence that ends bracketed paste; https://github.com/alacritty/alacritty/issues/800.

Re:Don't Copy Paste into a Shell on Friday October 16, 2020 @06:38PM (#24805690)
Apologies, it seems you already have that link. I have a bad habit of skimming, posting, and then hastily editing after re-reading the parent comment. I'll be more careful about that in the future.
Re:Don't Copy Paste into a Shell on Friday October 16, 2020 @06:33PM (#24805667)
Some terminal emulators strip control codes (like \\n) from pastes for this reason. Alacrity and konsole do this, at least.

Also, javascript isn't heeded for this vulnerability. https://thejh.net/misc/website-terminal-copy-paste is a link that demonstrates this with plain html, and has been discussed on HN before.

Re:Zig's New Relationship with LLVM on Monday September 28, 2020 @08:48PM (#24622995)
When you say Ada has a hefty price tag, what do you mean, exactly?

(Are you talking about ide licences, the commercially supported version of the compiler, ramp-up time to productiveness, or maybe something else?)

Somehow I've become interested in the economics of Ada, and am considering it in comparison to several other strongly typed systems programming languages for a learning project. So I'm a bit curious.

Re:Some Relatively Obscure Bash Tips on Sunday May 10, 2020 @02:01AM (#23130617)
Inline comments can be written as,

  cmd --longopt=val `# opt does foo with val` arg
instead, which I find more readable.
Re:Show HN: I published my first website – ShellMagic.xyz on Thursday February 13, 2020 @06:25PM (#22322407)
If you use fish shell, you can use man on the built in shell commamds. It's a nice experience.