Closed mookid closed 1 year ago
TODO: update readme, update --help, add tests?
@waldyrious please let me know what you think.
@mookid I think it would be good if diffr
used the same formatting syntax as git config uses, as I suggested earlier in #41. That would also make these configurations more portable, since delta
, diff-highlight
and diff-so-fancy
also use them, so it would be easier for people who are using some of these tools to migrate their setup to diffr
.
Do you think it would be easier to implement this feature in as-is and later change the syntax, or to implement it in the git-compatible syntax from the get-go? I'd rather wait a longer time for this feature than not have the compatibility at all.
(I wonder if any of @dandavison's code could be of help here, especially since delta
is also written in rust.)
@waldyrious I don't think that this code is useful for that purpose.
Can you share some code with a proposal of the behaviour you would like to see, based on that PR? I think that is possible to extend the pattern of accepted options easily.
Can you share some code with a proposal of the behaviour you would like to see, based on that PR?
Sorry, I am only familiar with delta's interface as an end-user, not with its code. Feel free to ignore my suggestions, by the way :) I'm just providing my input, for what it's worth, as someone who's experimenting with diffr; but the final decision of what syntax to use and how to implement this feature is, of course, yours.
This allows to configure the flags of diffr with a section like the following:
[diffr] line-numbers = true colors = refine-added:none:background:cyan:bold colors = refine-removed:none:background:magenta:bold
which corresponds to the invocation:
diffr \ --line-numbers \ --colors refine-added:none:background:cyan:bold \ --colors refine-removed:none:background:magenta:bold
If you use diffr without git, the option --no-gitconfig disables reading the .gitconfig files.
Fix #41