It is remarkably hard to escape command line arguments safely on Windows, and the standard libraries of multiple languages have needed patching: https://flatt.tech/research/posts/batbadbut-you-cant-securely-execute-commands-on-windows/
Related Posts
I would *love* a terminal emulator that treated each command as an atomic unit, so I can efficiently scroll between them.
Line-based scrolling is annoying when you've just run a command that output 1,000 lines.
Do any such tools exist?
I'm experimenting with diagnostics formatting.
* I've added a left margin, showing both the file name and line numbers
* I'm showing one line of context above/below the offending line.
* I'm using grey for comments.
What do you think? Is there anything you'd change?
In LSP, a position is represented as a line number and a column offset (in Unicode code units): https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#position
This is pretty elegant. You'll get the correct line regardless of encoding bugs, and the editor already knows the line number so it's cheap to compute.