I appreciate the suggestions. I can write a "canned" shell script for  
BBedit, that's easy, but the general problem is feeding it parameters.  
In the present case, the "parameters" are the command itself, but  
there are tons of cases where you'd like to be able to pass a flag or  
column number or pattern. Popping up a display dialog from a shell  
filter seemed like the obvious way to do it.

I considered the idea of typing the command into the file, I suppose  
something like

#!/bin/ksh                      -- prefix line
{ cat <<\FIN                    -- prefix line
aaa bbb ccc                     -- data line
ddd $eee "fff"                  -- data line
FIN                             -- suffix line
} | awk '{print $2,$1,$3}'      -- suffix line

would work, for example, to change the order of columns. But check it  
out--that's four extra lines typed when all you really need is one.  
And what's with having to put in the #!? The convention is either to  
default to #!/bin/sh or to your default shell.

And what if the part you want to change is not whole lines? Like this:

Leading stuff here #!/bin/ksh
{ cat <<\FIN
aaa bbb ccc
ddd $eee "fff"
FIN
} | tr bcd ZYX trailing stuff here

The idea is, you select #!... through ...ZYX and click "run". This  
doesn't even work--apparently, you can't start one of those run text  
things unless the "#!" is at the beginning of a line (and yes, you can  
run regular unix filters like rot13 on pieces of lines).

Unless I've missed something, marking up the text as a shell script,  
while incredibly cool, isn't really all that close to the vi!  
functionality I've been looking for.

I guess applescript is probably the only real solution, so I'll fiddle  
around with it some more.

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