How to propagate ansi codes in tables through a pipe? #12780
Answered
by
Jan9103
alecandido
asked this question in
Q&A
-
It seems that every time a command is targeting standard output, ansi codes are removed. This is usually a good default, but sometimes you might want to preserve them... config env --default | nu-highlight | lines | less -R |
Beta Was this translation helpful? Give feedback.
Answered by
Jan9103
May 7, 2024
Replies: 1 comment 5 replies
-
I don't have issues when doing it this way |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i found a workaround:
| to text | less
it somehow determines if the it ever reaches a external command and then strips the ansi (checkable with
| lines | into string | save -r foo.txt; cat foo.txt
, etc).it seems to forget that its the same data when using
| to text
. i assume it stores some sort of "this is ansi" inside of the string and to text clears the metadata.