[erlang-questions] isatty/1 [erlang/otp#480]
Tuncer Ayaz
tuncer.ayaz@REDACTED
Mon Oct 6 18:04:29 CEST 2014
Hi Lukas and Andrew,
as the original ticket[1] was closed and it was suggested to continue
the discussion on the mailing list, let's try to conclude the
discussion regarding the usefulness of isatty/1 here.
Lukas wrote:
> The only check that I can think of that you can do with isatty is
> checking if the IODevice definitely does not support any escape
> sequences. Getting true back does (afaik) not give you any details
> about how you can communicate with it.
>From what I understood, detecting that it's not an interactive
terminal is sufficient for Andrew to decide that the output should
automatically go to a file. This appears to be reasonable and useful
regardless of escape codes. Thoughts?
[1] https://github.com/erlang/otp/pull/480
More information about the erlang-questions
mailing list