Skip to content

isatty check is too simple #40

@tdprime

Description

@tdprime

I noticed that coloured output stopped working a few months back. Took a bit of poking around. Wondered if the library might be checking isatty(). Found the code change. Also verified my use case by setting FORCE_COLOR=1.

What I had been doing for long output, mytool | less -R.

You will notice, from the perspective of mytool, isatty() gives different answers for stdin and stdout.

But, it's not that simple. Different tools and different code have diffrent needs. Sometimes it's best that the library do the result because it doesn't know the context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions