radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
547 stars 74 forks source link

[#309] Write beancount files to disk before formatting #310

Open John-Goff opened 1 month ago

John-Goff commented 1 month ago

Fixes #309

The bean-format tool reads a file from the filename passed on the command line, then outputs the formatted file to STDOUT. The filename passed on the command line is a requirement, the bean-format tool does not read from STDIN at all. Another option would be to use ("bean-format" input "-o" output), but this way apheleia can avoid an extra file read that's not strictly necessary.