-
Notifications
You must be signed in to change notification settings - Fork 73
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
Support diffing with colordiff/delta/etc #371
Comments
I think this is a good idea. I don't really know if and when I'll have the time to implement it though. |
This issue is stale because it has been open for 30 days without activity. |
Forgot to keep this open. |
For what it's worth, to get colored diff output I've used this little Fish shell function for years, and it gets the job done nicely: function gd
set --function diff ( \
gmailctl diff \
| grep --invert-match --extended-regexp '^(@|---|\+\+\+)' \
| string collect)
echo -n "$diff" | bat --plain --language diff
test -n "$diff" && confirm 'Apply?' && gmailctl apply --yes
end You need bat and the function confirm --argument-names prompt
read --function response --nchars 1 --prompt-str \
(set_color brmagenta)"■ $prompt "(set_color yellow)
test $response = y
end |
Would it be possible to hook in external diff viewing tools like colordiff.org or https://dandavison.github.io/delta/ when printing config diffs?
Sometimes it's hard to read long diffs with a bunch of trivial churn to whitespace or ordering and a better diff visualizer would help a lot.
The text was updated successfully, but these errors were encountered: