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: add --[no-]strip-ansi-codes option #782

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

srithon
Copy link

@srithon srithon commented Dec 16, 2024

refs: #739, #188 (comment)

I chose to hide the conditional behind an interface to simplify the call sites and duplication of flag processing across commands. If we add further stdin-related options in the future, this would become more useful, as more logic would be abstracted away. However, I can see the argument against this approach; this pattern isn't used in the rest of the codebase (from what I saw), and adding it for such a small feature might not be worth the added complexity. In that case, it would be pretty easy to get rid of the interface and just inline the conditional in every command.

@srithon srithon marked this pull request as draft December 16, 2024 00:28
@srithon
Copy link
Author

srithon commented Dec 16, 2024

I realized that the fix for #689 was #739, and so it'll take more work than just re-enabling ANSI codes to make colored options work correctly.

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.

1 participant