On 7 Apr 2020, at 8:59, jh wrote:
I realise it would only work if the document is saved to disk of
course. js-beautify has the option to read from STDIN as well, so can
I do that, and have the output piped back in to the current document?
Yep, do it with STDIN/STDOUT. Here is a text filter I've got installed:
```
#!/bin/sh
## https://github.com/einars/js-beautify
## https://www.npmjs.org/package/js-beautify
# js-beautify -f - --good-stuff
/usr/local/bin/js-beautify --e4x -f -
```
Using STDIN/STDOUT means you also process the __selected__ text, rather
than processing the whole file.
-cng
--
Charlie Garrison <[email protected]>
Garrison Computer Services <http://www.garrison.com.au>
PO Box 380
Tumbarumba NSW 2653 Australia
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/DACACC2B-ED00-4299-9DF0-CEEEF728398E%40garrison.com.au.