Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): add JQ_COLORS environment variable support #77

Closed
wants to merge 3 commits into from

Conversation

lanej
Copy link
Contributor

@lanej lanej commented Mar 3, 2025

Warning

This would be respected when the default configuration file is created as part of #70 but after, the configuration file would take precedence.

Note

Boolean is considered a single value currently, but JQ treats false and true as different. I'm choosing to use true only at the moment.

  • Introduced JqColors struct to handle JQ_COLORS parsing
  • Updated ConfigContentStyle to support conversion from &str
  • Modified Config default implementation to use JQ_COLORS
  • Added tests for JqColors parsing and ConfigContentStyle conversion
  • Updated ConfigFile to use ConfigContentStyle instead of ContentStyle
  • Updated Config to use CrosstermContentStyle instead of ContentStyle
  • Added JqColors parsing from environment variable in Config default
Screen.Recording.2025-03-02.at.16.50.30.mov

- Introduced JqColors struct to handle JQ_COLORS parsing
- Updated ConfigContentStyle to support conversion from &str
- Modified Config default implementation to use JQ_COLORS
- Added tests for JqColors parsing and ConfigContentStyle conversion
- Updated ConfigFile to use ConfigContentStyle instead of ContentStyle
- Updated Config to use CrosstermContentStyle instead of ContentStyle
- Added JqColors parsing from environment variable in Config default
@lanej lanej changed the base branch from main to v0.6.0/dev March 3, 2025 00:43
lanej added 2 commits March 2, 2025 16:46
The CI workflow is now triggered on both push and pull_request events.
This ensures that tests are run for both direct pushes and pull
requests, improving the reliability of the codebase.
Removed the redundant map_err call in the write_default_config
condition within the main function.
@ynqa ynqa deleted the branch ynqa:v0.6.0/dev March 27, 2025 14:48
@ynqa ynqa closed this Mar 27, 2025
@ynqa ynqa mentioned this pull request Mar 28, 2025
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants