|
From: | Robert Goulding |
Subject: | Re: Problem using formatter |
Date: | Sun, 24 Jul 2022 10:13:25 -0400 |
Op 23-07-2022 om 16:59 schreef Robert Goulding:
> And I'm guessing this is because pandoc sends the converted text to stdout. But
> according to the nanorc manpage, the formatter command sends the buffer to a
> temporary file, executes the command on the file, and then replaces the buffer
> with the modified file. But of course pandoc does not alter the file. It could be
> told to, with the output file option (-o) -- but how would I do that?
If the formatter program is unable to actually replace the file (that is:
doesn't know an option like sed's --in-place), then you'll have to write
a little wrapper script. For example:
#!/bin/sh
pandoc [other options] -o $1.formatted $1 &&
mv $1.formatted $1
Benno
[Prev in Thread] | Current Thread | [Next in Thread] |