mordant icon indicating copy to clipboard operation
mordant copied to clipboard

Check if STDERR is interactive

Open mikaelstaldal opened this issue 6 months ago • 2 comments

There seems to be no way to check if STDERR is interactive, only STDIN and STDOUT.

mikaelstaldal avatar Aug 07 '25 14:08 mikaelstaldal

That's true. The reason it's not in the TerminalInfo now is that not every environment has a stderr. But given that all the Terminal.print functions take a stderr argument now, I think it makes sense to add that.

We have to decide what to do for environments (like the browser) that don't have stderr, though. Make errInteractive a Boolean?? If we make it non-nullable, what should it's value default to if stderr doesn't exist?

ajalt avatar Aug 07 '25 16:08 ajalt

We have to decide what to do for environments (like the browser) that don't have stderr, though. Make errInteractive a Boolean?? If we make it non-nullable, what should it's value default to if stderr doesn't exist?

Boolean? would make sense I think.

mikaelstaldal avatar Aug 07 '25 17:08 mikaelstaldal