How do you handle ansi color output?

60 views
Skip to first unread message

prtk

unread,
Jan 14, 2022, 5:10:54 AM1/14/22
to plan9port-dev
Hello!

I am running acme with rc shell.

Output of some commands contain ansi colors ag, git etc.

For now I pipe the output to ansi2txt to get rid of color codes.

Is there a better way to handle this?

Some commands offer way to turn of colors but it is lot to type.

Thanks!

Petter Rodhelind

unread,
Jan 14, 2022, 5:23:18 AM1/14/22
to pratik....@gmail.com, plan9port-dev
I set these environment vars from my acme startup script for a somewhat better experience:

TERM=dumb
MANPAGER='9 p'
PAGER='col -b'

It is then up to each external command to honor the dumb terminal setting. Most do, some don’t. The color codes are gone in git at least.

— prd
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "plan9port-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to plan9port-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/plan9port-dev/cd56fef8-2bad-4c26-b55c-d7fd9715d3d5n%40googlegroups.com.


Reply all
Reply to author
Forward
0 new messages