-
Notifications
You must be signed in to change notification settings - Fork 19
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
Supported colored diff output #48
Comments
Or we can use something like https://stackoverflow.com/questions/32500167/how-to-show-diff-of-two-string-sequences-in-colors |
Fellow Gentoo user similarly annoyed by this. It would be nice if we could configure the diff tool via environmental variable or a command line flag to specify the diff tool used. I'd like to be able to use @xsuchy I like the idea of using the Python diff library's coloring feature as well which would fit many people's needs. I think additionally providing a way to customize the diff program used would be nice as well. I can open a separate bug if you think what I'm saying is unrelated. If you don't mind pull requests I think I could implement this. |
You already can. Both on the command line and using env variable. See man rpmconf:
It is "just" matter of defining the TYPE. The code is here PR is welcomed. |
In this branch, I have implemented, more or less, what @haasn and I were asking for. This was done by:
I didn't see any unit tests in the repo so I didn't implement any for these changes. If that's incorrect please let me know and I'll write tests. If these changes are okay with you I'll open a pull request for this branch. If you have any comments / suggestions / ideas please feel free to let me know. In this branch, I tried implementing color using Python's |
Can you file a pull request? That will be easier for review. |
Coming from the Gentoo world I am really frustrated by how user-unfriendly rpmconf is in comparison to the fantastic dispatch-conf.
One very simple change that would make this tool a lot nicer to use would be the use of colored diff outputs (
/usr/bin/diff --color=auto
). I had a brief look at the code and it seems like you are using python's built-in difflib, which doesn't support this. So the fix would most likely be making rpmconf always use an external tool, and then let the user configure which one.The text was updated successfully, but these errors were encountered: