aboutsummaryrefslogtreecommitdiff
path: root/apheleia-formatters.el
diff options
context:
space:
mode:
Diffstat (limited to 'apheleia-formatters.el')
-rw-r--r--apheleia-formatters.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/apheleia-formatters.el b/apheleia-formatters.el
index c98b790..a6f2126 100644
--- a/apheleia-formatters.el
+++ b/apheleia-formatters.el
@@ -938,7 +938,10 @@ See `apheleia--run-formatters' for a description of REMOTE."
(let ((ctx (apheleia-formatter--context)))
(setf (apheleia-formatter--name ctx) nil ; Skip logging on failure
- (apheleia-formatter--arg1 ctx) "diff"
+ (apheleia-formatter--arg1 ctx)
+ ;; Search gdiff in PATH, else use diff, useful for BSD
+ (if (executable-find "gdiff") "gdiff"
+ "diff")
(apheleia-formatter--argv ctx) `("--rcs"
"--strip-trailing-cr"
"--text"