-
Notifications
You must be signed in to change notification settings - Fork 410
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
Fallback for diffFilter.interactive #178
Comments
Hi @pylipp, I think the way to do this is with a shell script. This should work on Linux or MacOS but on Windows might need to be changed a little. So what you'd do is create a file like this, for example saving it at #!/bin/bash
if which delta > /dev/null 2>&1; then
exec delta "$@"
else
exec less -RFX
fi Then in your
I tested that quickly but let me know if you have any problems with it! There are lots of variations one could make to that. For example see #19 (comment) regarding using the same delta options in the main |
That does the trick, thanks (I'm on Linux)! Also for combining the two git config options. What's the advantage of using |
Good!
One reason is to ensure that the exit status is equal to the exit status of the delta process. If there were more lines in the script beyond the |
TIL, thank you :) |
Hej, thanks for the amazing tool!
I have a question (about git configuration rather):
How can I have
diffFilter.interactive
configured in a way that it falls back to the default (colored) output whendelta
is not installed?I tried
which in combination with
git add -p
has the non-colored outputMaybe someone has a similar situation :)
The text was updated successfully, but these errors were encountered: