4 ms·
TUI and CLI isn't the same thing. A badly written TUI will fail to check isatty() on stdin and will dump ANSI escape codes, which are not trivial to remove from
by lionkor 3mo ago
TUI and CLI isn't the same thing. A badly written TUI will fail to check isatty() on stdin and will dump ANSI escape codes, which are not trivial to remove from the output as they follow a format that has different formats, lengths and sentinels that denote the ending.
- dtj1123 3mo agoI'm fully aware they're not the same thing, I'll not sure what gave you the impression I think they are. I agree that a badly written TUI is... badly written? Obviously I'm referring to well executed TUIs. For example, I regularly pipe the result of ls, grep or fd into Helix then use multicursor editing to set up a script. You simply can't do that with a GUI.
- lionkor 3mo agoThose are not TUIs, or rather, when we say TUI we usually mean interactive UI in the terminal.