Skip to content

Tea and termenv do not honor WithOutput properly #420

@knz

Description

@knz

There's a mismatch in API semantics:

  • termenv relies on the output going to os.Stdout
  • bubbletea makes this configurable (via WithOutput)

When bubbletea WithOutput is used with a different file, termenv does not recognize color profiles properly any more.

Generally, the mistake being made is the assumption that stdout is the file descriptor connected to the terminal. generally, the terminal is to be found on stdin, not stdout (and neither stderr!)

This mismatch is the cause of the following issues:

I understand that the "next generation termenv" at https://github.com/muesli/termenv/tree/termenv-next would help with this, but I don't seem to see a timeline to get this moving forward?

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