15 ms·
Nice tool, but I agree with other commenters that it needs to be implemented at the level of the terminal emulator (which makes it much harder to implement). Th
by nasretdinov 2y ago
Nice tool, but I agree with other commenters that it needs to be implemented at the level of the terminal emulator (which makes it much harder to implement). The reasons for this are the following:
1. If a tool outputs escape sequences and expects the cursor to be at a certain position, this assumption will break
2. You have to not forget to pipe it, which might not always be possible to do cleanly
3. Since you're piping the output, many tools will stop using colours, etc, which is annoying.
I've tried to make a similar tool, but as a patch to bash (to color stderr output), and it had many issues that can't be resolved on that level, e.g. many programs assume that stderr and stdout point to the same PTY, so they can print some ascii sequences to stdout and some to stderr, and expect them to be displayed in the correct order. (The article about it, in Russian: https://habr.com/ru/articles/207768/ https://habr.com/ru/articles/207768/)