Re:Ask HN: What do you love/hate about terminals? Would you ...
by baq on Wednesday December 27, 2017 @11:22AM
(#16015643)
if shells had some more types than a stream of bytes, it'd make sense for 'image' type data to be displayed as images. the pipes you mention are then simply type casts or conversion functions.
Re:Ask HN: What do you love/hate about terminals? Would you ...
by jstimpfle on Wednesday December 27, 2017 @01:20PM
(#16016680)
I don't know what you think is missing. "Displaying 'image' type data as images" totally works. Are you aware of magic bytes (which I mentioned above)?
Re:Ask HN: What do you love/hate about terminals? Would you ...
by baq on Thursday December 28, 2017 @03:25PM
(#16024642)
never used them, but i'm thinking more in terms of powershell (pretty sure displaing images isn't something it does though). if images in particular work ok then that's one thing that i can scratch off my list of annoyances with ssh.
It's not a problem to have this handled in the shell such that the output is rendered in such a way as to please the terminal. You can do this manually (e.g. append a "| display-jpeg-in-terminal" command to the pipeline), or use a magic bytes based file viewer.
Look at "run-mailcap" or its shortcuts like "see". It does basically that, and can also be fed through standard input (which covers the piping situation).