News for hackers. Stuff that matters.
Re:CLI: Improved by vram22 on Thursday August 30, 2018 @06:02PM (#17881201)
>your CLI tool could mark its output as 'text/html', and then your terminal could embed a web browser right in the middle of your terminal window to display it.

Ha ha, I had dreamed up something like this in one of my wilder imaginings, a while ago: A command-line shell at which you can type pipelines, involving some regular CLI commands, but also GUI commands as components, and when the pipeline is run, those GUIs will pop up in the middle of the pipeline, allow you to interact with them, and then any data output from them will go to the next component in the pipeline :) Don't actually know if the idea makes sense or would be useful.

Re:CLI: Improved by jolmg on Friday August 31, 2018 @12:24AM (#17882945)
Sure it makes sense. Just put `gvim /dev/stdin` in the pipeline you desire and write to stdout when you're done. You can add to your configuration to remap `ZZ` (which usually saves the file and exits) to `:wq! /dev/stdout` when stdout is not a terminal. I'm going to do that when I get back to my computer.
Re:CLI: Improved by vram22 on Friday August 31, 2018 @02:07PM (#17887654)
That sounds like a cool use of the concept. Will try it out. Thanks.
Re:CLI: Improved by h1d on Thursday August 30, 2018 @11:21PM (#17882668)
It does. For example, you could pipe an output of diff and a GUI diff viewer starts up and it's a whole lot easier to see or merge the context and even you may be able to launch a 'system default' app for that instead of a predefined app.

And another apparent one is image viewer or editor.

Re:CLI: Improved by v_lisivka on Thursday August 30, 2018 @07:33PM (#17881753)
Re:CLI: Improved by chriswarbo on Thursday August 30, 2018 @07:47PM (#17881817)
> A command-line shell at which you can type pipelines, involving some regular CLI commands, but also GUI commands as components, and when the pipeline is run, those GUIs will pop up in the middle of the pipeline, allow you to interact with them, and then any data output from them will go to the next component in the pipeline

There seems to be some precedent for this sort of thing. For example, DVTM can invoke a text editor as a "filter", where the editor UI is drawn on stderr and result saved to stdout.

Re:CLI: Improved by flukus on Thursday August 30, 2018 @11:34PM (#17882738)
> where the editor UI is drawn on stderr and result saved to stdout

I did some experimenting recently and found you can open a new /dev/tty file descriptor and tell curses to use this, the rest of the application can continue reading stdin and writing stdout as normal.

Re:CLI: Improved by type0 on Friday August 31, 2018 @11:07AM (#17886162)
I think you could use rofi for that, just insert it to the pipes and filter accordingly.
Re:CLI: Improved by vram22 on Friday August 31, 2018 @02:13PM (#17887687)
Thanks, had not heard of rofi. Just took a look. Seems like a useful tool.