Skip to content

Piping to pager (eg. less -R) loses all color #122

Answered by muesli
rockorager asked this question in Q&A
Discussion options

You must be logged in to vote

lipgloss (or rather termenv in the background) detects that the output isn't connected to a terminal and strips the styling. You can either set a color profile manually or set an environment variable which enforces colored output:

lipgloss.SetColorProfile(termenv.TrueColor)
CLICOLOR_FORCE=1 go run .

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rockorager
Comment options

Answer selected by rockorager
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #121 on September 22, 2022 11:30.