-
Notifications
You must be signed in to change notification settings - Fork 22
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
Feature request: support configuration via environment variable or config file #41
Comments
I think that the program is not complex enough to enough to justify a config file for now. |
@mookid please reconsider. I've been following the development of a similar tool, and since they introduced git-config-based customization, the tool has been much more convenient to use and to tweak. For reference, here's the invocation I currently have to use to tweak diffr's colors to match my preference (basically, mimicking diff-highlight):
Having those settings in gitconfig, like this: [core]
pager = diffr | less -R
[interactive]
diffFilter = diffr
[diffr "colors"]
refine-removed = foreground:black:nobold
refine-added = foreground:black:nobold ...would be much more manageable :) |
Hi @waldyrious, reopening. I won't say that this is high in my priority list, but could land sometime. The .gitconfig is indeed a nice place where to put the config if that's possible (even if I a not thrilled about being git specific). |
@waldyrious I wonder what you think about the compromise to put the long command line into the git config? [interactive]
diffFilter = diffr --colors refine-removed:foreground:black:nobold --colors refine-added:foreground:black:nobold |
It is, as you say, a workaround. It works, of course, but I'd like to be able to tweak the configuration more easily than editing a long string with a custom grammar. Using separate configuration entries makes the configuration easier to write, and easier to read. Also, it could reuse the same formatting specifications that git already uses, so that would be one less DSL to learn. |
@grossjohann if you also want to use it in |
@mookid I see you closed this issue as "completed". Did you mean to close it as "not planned"? Or did I miss something? |
yes, that's correct. I have no time to implement that, and nobody suggested code to do it either; as cleaning up the backlog, I closed the issue. |
I think it would be convenient if the
--colors
parameter wasn't the only way to customize the colors. Maybe if--colors
is not provided, look in an environment variable? I guess using a config file is over-engineered.For the time being, a short wrapper shell script will do the trick, of course.
The text was updated successfully, but these errors were encountered: