Thank you! I came here wondering why a text filter wasn't working, but it did when run in terminal. Mine was the same issue. I was passing the text contents instead of the file which php-cs-fixer expects. Oh well, guess I'll just keep terminal open when needed.
On Tuesday, December 20, 2022 at 10:01:20 AM UTC-5 [email protected] wrote: > I haven't used beautysh but it looks like it's expecting to be passed the > name/path of a file to operate on, and rewrites the file in place? > > A text filter, on the other hand, is passed the contents of the file you > run it against, in the standard input (sys.stdin in Python). > > So you may need to adapt the module interface mentioned in the docs ("You > can also call beautysh as a module") in order to use it as a text filter. > > --Kevin > > On Tue, Dec 20, 2022 at 9:24 AM Greg Raven <[email protected]> wrote: > >> I have a couple of Bash-language text filters that work great. I just >> tried to create a new one, which instead of working as expected generates >> an error message. >> >> Here's the code: >> >> ``` >> #!/bin/sh >> >> ## requires macOS CommandLineTools >> ## requires pip3 install beautysh >> >> python3 ~/Library/Python/3.9/bin/beautysh >> ``` >> When I run beautysh from the command line, it seems to work fine, just >> like my text filter that employs css-beautity, js-beautify, and json.tool >> and uses similar coding. >> >> Can anyone shed any light on this? >> >> -- >> 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/b58483e7-bf67-4e06-899c-a506a2ed88fcn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/bbedit/b58483e7-bf67-4e06-899c-a506a2ed88fcn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- 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/a6a54d62-6645-4fea-bee7-9355abfd0fe5n%40googlegroups.com.
