Add -NoColor switch parameter to control colored output in formatters#18
Merged
HeyItsGilbert merged 6 commits intomainfrom Aug 16, 2025
Merged
Add -NoColor switch parameter to control colored output in formatters#18HeyItsGilbert merged 6 commits intomainfrom
HeyItsGilbert merged 6 commits intomainfrom
Conversation
Contributor
Author
|
@HeyItsGilbert 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
Copilot
AI
changed the title
[WIP] Add Option for User to Turn on/off Coloring
Add -NoColor switch parameter to control colored output in formatters
Aug 16, 2025
HeyItsGilbert
approved these changes
Aug 16, 2025
ed730d5 to
17b1dce
Compare
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>
17b1dce to
e10fdb4
Compare
* Added multiple log files to the `tests/fixtures/folder` directory to enhance test coverage for the `Read-ChocoLog` function. * Updated test setup to utilize these new log files, ensuring comprehensive testing of log parsing functionality. * Refactored test cases for better clarity and accuracy in assertions.
Owner
|
@copilot Bump the minor version. Add a corresponding entry to the changelog. |
|
@HeyItsGilbert, ⭐3 XP earned, 🏆First Comment Added completed, 💪Level 8 achieved! [Details] |
Co-authored-by: HeyItsGilbert <615265+HeyItsGilbert@users.noreply.github.com>
Contributor
Author
|
|
||
| - `-NoColor` switch parameter to both `Read-ChocoLog` and `Get-ChocoLogEntry` functions | ||
| - Module-level variable `$script:ChocoLogNoColor` to control formatter behavior | ||
| - Colored output control in `ChocoLog.format.ps1xml` formatter |
There was a problem hiding this comment.
Be careful with Colored, it’s profane in some cases colored retext-profanities
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
-NoColorswitch parameter to bothRead-ChocoLogandGet-ChocoLogEntryfunctions to allow users to disable colored output in the formatter. This addresses user needs for plain text output in environments that don't support ANSI colors or when capturing output for logging systems.Changes
-NoColorparameter to both public functions with proper documentation$script:ChocoLogNoColorto control formatter behaviorChocoLog.format.ps1xmlto conditionally apply colors based on the variable$bgvariable was referenced in the original formatterUsage
Benefits
The implementation allows users to customize their experience based on their terminal capabilities or output requirements while maintaining the enhanced visual experience for users who want colored output.
Fixes #10.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.