jaywcjlove / jaywcjlove/loading-cli
colors are not maintained (and no option to force them) when used in a pipe
- Dominant language
- JavaScript
- Stars
- 56
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
I added this library to a command I wrote in node and it works great.
I added support for piping my command to one another.
All colors set by me using libraries like chalk, colors or colorette are working regardless of if the command is in a pipe or not.
loader specifically doesn't show the correct colors if the output is not a TTY
command run `gs-cli generate company`
shows:
command run `gs-cli generate company | echo`
shows:
is there a way to force colors?
if not, maybe it will be nice to have an option like that
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the behavior with `gs-cli generate company` and with the same command piped to `echo`, then inspect how the CLI handles colors when stdout is not a TTY. Done means colors remain correct in a pipe or an explicit force-colors option is available, with coverage for both command forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100