I am a great fan of the freeware text editor BBEdit Lite, and wanted to use it as my "alternate editor" in the UNIX mail program Pine. I had already been cutting and pasting data between the two applications, but I knew there had to be a more elegant solution.
All of my various experiments didn't work. I couldn't use the 'bbedit' system alias I had set up (thanks to this hint); Pine didn't recognize the alias as an editor. And I couldn't use the raw 'open -a [app name]' command, since Pine demanded that the temporary file exist before it was edited, and Pine also had to be required to wait for me to finish my revisions in BBEdit Lite before taking the file back.
Read the rest of the article for the solution to the problem...
I needed to create a shell script that (a) created a text file with the temporary file name Pine demanded, (b) loaded that text file into BBEdit Lite, and (c) held Pine from coming back until the file was completely edited. And here it is:
touch $1Name this as a script (I named mine 'bb-pine'), make it executable, and then put it into /usr/local/bin (General question: Is there a better or more appropriate place on the system to put shell scripts?). Then put the script (with its full path) into your 'alternate editor' setting in your PINE configuration file:
open -a '/Applications/BBEdit Lite/BBEdit Lite.app' $1
clear
echo "Press the Enter key to continue ... "
stty -echo
read enter
stty echo
case $enter in
editor=/usr/local/bin/bb-pineYou should now be able to use BBEdit Lite as your preferred editor in Pine.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20020612093140521