Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there a way to tell difft that a particular extension is a particular format? Or that it could guess for unknown formats whether they are xml by e.g. scanning the first lines for <tags> before falling back to text?

Because xml files are very often not using the extension xml and treating them as plaintext means losing a lot of the structural goodness.



Yes there is an `—-override` option you can use to specify the language in which a file should be parsed.

https://github.com/Wilfred/difftastic/blob/master/CHANGELOG....


Perfect, thanks.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: