You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are people's thoughts on adding a color: bool arg to difflib.unified_diff so that it injects ANSI terminal codes to color things in the way that git diff would?
Uh oh!
There was an error while loading. Please reload this page.
Feature or enhancement
Proposal:
What are people's thoughts on adding a
color: bool
arg todifflib.unified_diff
so that it injects ANSI terminal codes to color things in the way thatgit diff
would?New API:
Open questions:
colors={"equal": "\033[31;1;4m", "delete": "...", "insert": "...", "header": "...", "hunk": "..."}
git diff
.:\033[1m
\033[36m
\033[31m
\033[32m
ndiff
andcontextdiff
?I'd be happy to tackle this. Excluding tests, it looks to be O(20 LOC) changes.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
_colorize
and 'color' option todifflib.unified_diff
#133725The text was updated successfully, but these errors were encountered: