News for hackers. Stuff that matters.
Re:Alternative shell with native support for JSON, YAML, TOM... by ridiculous_fish on Saturday February 27, 2021 @05:48PM (#26288890)
Wait it's interposing stdout as well? How do programs like vim work if they aren't connected to the tty?
Re:Alternative shell with native support for JSON, YAML, TOM... by hnlmorg on Saturday February 27, 2021 @07:35PM (#26289576)
It's only proxying STDOUT if STDOUT is a pipe. If it isn't (which it wouldn't be if you're running `vim`) then the STDOUT is the TTY as usual.

eg

    vim        # `vim`s STDOUT is a TTY
    vim | cat  # `vim`s STDOUT is a pipe but `cat`s STDOUT is a TTY
In that regard, murex isn't really any different to any other shell. As in `vim | cat` would produce the same "Warning: Output is not to a terminal" error in bash, zsh or murex. But the difference with murex is when two processes are piped together, murex acts as a proxy. So it's a bit like this: `vim | murex | cat` (to borrow the 2nd example above).