chocolatey / chocolatey/choco

Support ANSI color output.

Open
#2,499 2 comments 2 reactions 0 assignees View on GitHub
0 - Triaging Enhancement Priority - Low
Dominant language
C#
Stars
11.5k
Forks
960
PR merge metrics
No merged PRs in 30d

Description

It seems that Chocolatey uses Windows console colors for output.

For a command such as:

ssh winserver choco install -y somepackage

there are no colors. While this is a deficiency in OpenSSH for Windows, it would be nice if the Chocolatey logging system was able to output normal ANSI colors, which would make this work.

This could be controlled with a parameter, e.g. `--color=auto`, `--color=console`, `--color=ansi`, or something like that.

It could also check for the existence of `$env:SSH_CONNECTION` and switch to ANSI output automatically.

This shouldn't be too difficult to implement. If the logging system uses a command for color output, it could be overridden to use the appropriate system depending on the configuration.

Contributor guide

Open the contributing guide

Research direction

Start by tracing Chocolatey's logging system and how it currently produces console colors. Define how a color parameter such as --color=auto, --color=console, or --color=ansi should affect output, including the proposed SSH_CONNECTION detection, then verify that remote SSH output uses ANSI colors without breaking normal console output.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.