I'm pretty sure this simple shell script would fail for any content that contained a double-quote character, since it would prematurely end the "$1" structure.
External shell scripts for BBEdit as of this writing don't use this sort of $1 logic anyway, and consequently don't pass anything on to gpg: * Unix Script Output.log: cat: : No such file or directory gpg: processing message failed: Unknown system error Any more robust ideas? Really need something like this, ideally working as a Service inside any any app, but a BBEdit script or plugin would be better than nothing. The old MacPGP (in OS 9) could encrypt to/from the Mac OS clipboard. But MacGPG 2 (OS X's current GPGTools port, as of this writing) can't do this; it only has Services for acting on entire files, and these don't even seem to work unless you are in the Finder rather than in some app like BBEdit. Yes, I'm aware that there are various GPG plugins for specific e-mail apps, including Apple Mail, Mozilla Thunderbird and MS Entourage, but that's not really sufficient. Need to be able to do GPG inside BBEdit text files. On Saturday, June 5, 2010 8:28:58 AM UTC-7, Tim Gray wrote: > > On Jun 05, 2010 at 02:19 AM -0500, Adam Turetzky wrote: > > Is anyone aware of scripts for GPG encrypt/decrypt text using BBEdit? > > There are Applescripts for this for Mailsmith. I'm sure you could adapt > those to BBEdit pretty easily. > > Alternately, you should be able to write a shell script that just pipes > the > text through gpg to decrypt a block. Something along the lines of: > > #!/bin/sh - > cat "$1" | gpg > > You'd have to write variations off of that for the other gpg commands. > > -- This is the BBEdit Talk public discussion group. If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.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 bbedit+unsubscr...@googlegroups.com. To post to this group, send email to bbedit@googlegroups.com.