Make headscale console ANSI output optional #371

Closed
opened 2025-12-29 01:27:51 +01:00 by adam · 3 comments
Owner

Originally created by @mhameed on GitHub (Nov 20, 2022).

For example:

    headscale node list

produces output with ANSI escape sequences.
The command also does not determine if the output is to a terminal or a file.
For someone who is blind and uses a braille display, ANSI escape sequences is just noise.
Can we please make the addition of ANSI escape sequences optional, or have a flag to turn them off?

Thanks.

Originally created by @mhameed on GitHub (Nov 20, 2022). For example: headscale node list produces output with ANSI escape sequences. The command also does not determine if the output is to a terminal or a file. For someone who is blind and uses a braille display, ANSI escape sequences is just noise. Can we please make the addition of ANSI escape sequences optional, or have a flag to turn them off? Thanks.
adam added the bug label 2025-12-29 01:27:51 +01:00
adam closed this issue 2025-12-29 01:27:52 +01:00
Author
Owner

@mhameed commented on GitHub (Nov 23, 2022):

Appologies, it should have been an enhancement rather than a bug.

@mhameed commented on GitHub (Nov 23, 2022): Appologies, it should have been an enhancement rather than a bug.
Author
Owner

@kradalby commented on GitHub (Dec 15, 2022):

Hi

This should already implemented and we implement https://no-color.org, it should be turned off if you set NO_COLOR as an environment variable.
https://github.com/juanfont/headscale/blob/main/cmd/headscale/headscale.go#L31

Please let me know if this is not the case.

@kradalby commented on GitHub (Dec 15, 2022): Hi This should already implemented and we implement https://no-color.org, it _should_ be turned off if you set `NO_COLOR` as an environment variable. https://github.com/juanfont/headscale/blob/main/cmd/headscale/headscale.go#L31 Please let me know if this is not the case.
Author
Owner

@mhameed commented on GitHub (Dec 17, 2022):

Thanks @kradalby for reminding me of the NO_COLOR environmental variable.

@mhameed commented on GitHub (Dec 17, 2022): Thanks @kradalby for reminding me of the NO_COLOR environmental variable.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#371