Thursday, April 27, 2017 [Tweets] [Favorites]

One-off Text Filtering in BBEdit

Dr. Drang:

Although I’m far from a Unix wizard, I do find myself thinking of transformations in terms of command-line utilities rather than Text Factory actions. If only BBEdit would let me just type out a pipeline to run the selected text through. Surprisingly, it’s not all that hard to give it that ability.


As you can see, most of Any Filter is an AppleScript command that displays a dialog box asking for and collecting the command. The final line is just the execution of that command. Because this is saved as a Text Filter, BBEdit knows to feed it the selected text (or the entire current document) and replace that text with Any Filter’s output.


Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment