I want to create something like fzf. The fzf renders to stderr, while returning content to stdour.
So next is possible (fzf will open interactive TUI):
But termenv do this by default:
func ColorProfile() Profile {
if !isatty.IsTerminal(os.Stdout.Fd()) {
return Ascii
}
return colorProfile()
}
I know what I can manually call lipgloss.SetColorProfile, but it will be cool if creating stderr apps will be easy, and the next code just work:
p := tea.NewProgram(m, tea.WithOutput(os.Stderr))
But now I need to copy-paste colorProfile() logic to be able to detect the correct profile.
Thanks!
I want to create something like fzf. The fzf renders to stderr, while returning content to stdour.
So next is possible (fzf will open interactive TUI):
But termenv do this by default:
I know what I can manually call
lipgloss.SetColorProfile, but it will be cool if creating stderr apps will be easy, and the next code just work:But now I need to copy-paste
colorProfile()logic to be able to detect the correct profile.Thanks!