News for hackers. Stuff that matters.
Re:Zsh and Fish’s simple but clever trick for highlighting m... by CJefferson on Sunday June 14, 2020 @04:59PM (#23521326)
I've always wondered, would it be reasonable / possible for a shell to run everythhing in a virtual tty? I would love a shell when programs couldn't effect each other's output, it was easy to dynamically put programs in the background while hiding their output, etc.
Re:Zsh and Fish’s simple but clever trick for highlighting m... by evmar on Sunday June 14, 2020 @05:48PM (#23521664)
I'm working on a shell that does this, for exactly the reasons you gave and more. It doesn't work well enough to announce here, but you can find an index of shells (including others that have had this idea) here: https://github.com/evmar/smash/wiki/Related-projects
Re:Zsh and Fish’s simple but clever trick for highlighting m... by chubot on Monday June 15, 2020 @12:33AM (#23523825)
Oh interesting, I have been thinking about related things for Oil:

Shell as an engine for TUI or GUI https://github.com/oilshell/oil/issues/738

That came out of a discussion with someone doing a really ambitious overhaul of terminals and display servers (linked in the issue).

I believe you could do some interesting things UI-wise with a shell that doesn't run in a terminal itself. The subprocesses would require a terminal, but the shell wouldn't. For example I've heard the suggestion to always keep the prompt at the top of the screen from a few people. That seems like it would be straightforward in an HTML UI, but it probably requires some cooperation from the shell itself.

Provide APIs to allow users to write their own line editor / interactive interface https://github.com/oilshell/oil/issues/663

This is a more Emacs-like architecture for a shell, with the interface being written in a high-level language rather than C/C++. That came out of running parts of ble.sh, which is an interactive shell written in bash !! (I believe it's the biggest bash program in the world, in both number of lines and sophistication)

If you have any ideas or suggestions, I'm interested. In the interest of time, I'm cutting out the interactive parts of the project and making it more like a library that other people can build shell UIs on top of.

I collected these links awhile ago but haven't done anything with them, there is some overlap:

https://github.com/oilshell/oil/wiki/Interactive-Shell

More shells here: https://github.com/oilshell/oil/wiki/ExternalResources

Re:Zsh and Fish’s simple but clever trick for highlighting m... by harikb on Sunday June 14, 2020 @05:02PM (#23521351)
Isn’t it what one would get by running screen or tmux? Am I missing something?

I guess you mean each command not affecting the very next command that follows?

Re:Zsh and Fish’s simple but clever trick for highlighting m... by CJefferson on Sunday June 14, 2020 @05:38PM (#23521614)
The problem is i need to know in advance if i want to put something in a seperate window, but that suggests it would be possible.
Re:Zsh and Fish’s simple but clever trick for highlighting m... by mst on Monday June 15, 2020 @08:35AM (#23526639)
reptyr can reparent a program if you only realise after the fact.

I try and remember to have that installed on the heavy-interactive-use servers I admin for when users have an "oshi-" moment because they forgot to start something under screen.

Re:Zsh and Fish’s simple but clever trick for highlighting m... by fiddlerwoaroof on Sunday June 14, 2020 @05:11PM (#23521433)
You could sort of simulate this with dtach in zsh:

    zle-line-init() if [[ $CONTEXT = start ]] LBUFFER=$zle_prefix$LBUFFER
    zle -N zle-line-init
    mkdir $HOME/dtaches
    zle_prefix='dtach -A $(mktemp -d $HOME/dtaches/XXXXX)/sock '
Re:Zsh and Fish’s simple but clever trick for highlighting m... by nyanpasu64 on Monday June 15, 2020 @12:53AM (#23523915)
I suspect xonsh runs everything in a virtual tty. Full-screen text editors fail to work left and right, like makepkg and possibly sudoedit as well.