On Thursday, June 14, 2012 12:39:24 AM UTC-4, Grail wrote: > > Just a note about using BBEdit for editing commit messages: I use > '/usr/local/bin/bbedit --wait --resume' for that purpose, mainly to allow > the commit message to be written before returning control to the invoking > process. >
Grail raises an excellent point: by default the bbedit command will turn immediately. This causes some confusion with some command line tools, which expect the editor command to quit only after the user has saved and quit their writing. In English, most command line tools expect to fire off the editor, and expect to hear back from the user when they are done editing. Instead, what the bbedit command does (by default) is to open the file in BBEdit then return immediately. So, the bbedit tool is written to behave like: "Ok, I have displayed the file to the user, my job is done". Where as most command line tools expect the editor's job to be done when the user saves + closes the document in question. Here's the line from my own unix config: export EDITOR=~/bin/bb My ~/bin/bb script looks like this: #!/bin/sh # Information for this script comes from: # <http://superuser.com/questions/383124/knowing-user-is-sshing-in-from-a-shell-script> if [[ $SSH_CONNECTION ]] then vim "$@" else bbedit -w "$@" fi This script says, "If the user is SSHing in right now, use vim as the editor. Else use BBEdit and wait around until the user closes the document in question". Why the check about SSH connections? I sometimes SSH into my main OS X machine using a Linux netbook. If I need to edit a file I don't want to launch BBEdit because I have no way of editing the text then because I'm not in front of OS X right now. Hope this helps, _Ryan Wilcox -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. 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 feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
