On some systems such as OpenBSD, the diff program does not support some of the features available under GNU diff, e.g. --strip-trailing-cr. AFAIK, there's no way to reproduce the behavior of --strip-trailing-cr without piping to tr or sed (which is probably not ideal).
So I think it might make sense to allow specifying diff program, so I can install gdiff and configure prettier-emacs to use it. This PR basically add prettier-js-diff-command to defcustom, and use it in place of the existing diff string.
On some systems such as OpenBSD, the
diff
program does not support some of the features available under GNU diff, e.g.--strip-trailing-cr
. AFAIK, there's no way to reproduce the behavior of--strip-trailing-cr
without piping totr
orsed
(which is probably not ideal).So I think it might make sense to allow specifying diff program, so I can install
gdiff
and configure prettier-emacs to use it. This PR basically addprettier-js-diff-command
to defcustom, and use it in place of the existingdiff
string.Thanks!