I'm new to BBedit.

I notice that there is a plethora of different ways to filter text
through a pipeline, but I can't find anything that corresponds to the
venerable vi "!" commands: specify some text, hit "!", type in a
pipeline, the selected text is written to the standard input of the
pipeline and the standard output of the pipeline replaces the text.

I tried making a filter like this (pardon my rudimentary applescript
abilities):

#!/bin/ksh
# read and execute a shell filter

eval "$(osascript <<\FIN
tell application "bbedit"
    display dialog "Filter selection thru shell command" with title
"Shell filter" default answer "cat" buttons {"go"} default button 1
end tell
set xxx to result
set nl to ascii character 10
set cmd to text returned of xxx
return cmd & nl
FIN
)"
exit 0

and it works fine when run from the terminal (echo stuff |
this_script), but just hangs when it is run from inside BBedit (from
the shell filters folder).

I remember reading that you're not supposed to do "fancy GUI stuff"
from those filters, and I'm guessing that putting up a display dialog
is too fancy.

Is there some way to filter text through an ad hoc shell pipeline? It
would really be convenient.

Cheers,
Greg Shenaut

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a specific feature request or would like to report a suspected (or 
confirmed) problem with the software, please email to "[email protected]" 
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to