4 ms·
Though TUIs have its place, this totally destroys the ability for text processing used a lot on Unix platforms where a more simple output would suffice. For som
by timvisee 6y ago
Though TUIs have its place, this totally destroys the ability for text processing used a lot on Unix platforms where a more simple output would suffice. For some applications like this it might be better to go for a non-terminal GUI anyway.
- piaste 6y agoTerminal (human) UI and scripting (machine) UI should be separate if the latter is a concern at all. Think Debian's apt which is intended for human use, while apt-get is for scripts and sticks to a predictable console output.
- sokoloff 6y agoTIL the difference between apt and apt-get; Thanks! (I was often a little bit curious, but never quite curious enough to go chase it down.)
- fratajcz 6y agoYou can check if stdout is a tty: if it's not, you output raw text. GNU ls does this: by default it outputs in a multiple column layout, but when piped, it outputs one file per line.
- nudpiedo 6y agofun to mention that in the days that many commands provide a --json flag to stream output directly to a programming API.
- flohofwoe 6y agoI think this should be selected with a command-line arg, show "human-friendly" output by default, and "pipe-friendly" output with a special argument.