Problem: Using bbedit as editor for git via git-config

2,025 views
Skip to first unread message

Daniel Lord

unread,
Jan 22, 2009, 10:09:17 PM1/22/09
to BBEdit Talk
I set it up in my config file:

[core]
editor = bbedit


When I perform a commit, BBEdit opens as expected. But whatever I type
in is not piping back to git--when I close the file git replies in the
shell: "aborting commit due to empty commit message."

I can work around it by providing the commit message on the command
line, but it kind of obviates the need to use BBEdit then because teh
commit doesn't open an editor. Anyone know what is going on and if
BBEdit and Git can be setup to work?

Jim Correia

unread,
Jan 22, 2009, 10:18:48 PM1/22/09
to bbe...@googlegroups.com
On Jan 22, 2009, at 10:09 PM, Daniel Lord wrote:

> When I perform a commit, BBEdit opens as expected. But whatever I type
> in is not piping back to git--when I close the file git replies in the
> shell: "aborting commit due to empty commit message."

git wants the editor tool to wait stay running until you are done
editing the file (which is what command line editors do.)

By default, `bbedit` exits immediately.

You want to add --wait (tool will wait for you to finish editing/close
the document before existing) and optionally --resume (pop the
terminal back to the front when finished.)

$ git config --global core.editor "bbedit --wait --resume"

Jim

Daniel Lord

unread,
Jan 22, 2009, 10:53:42 PM1/22/09
to BBEdit Talk
Thanks. Much appreciated.

Lewis@Gmail

unread,
Jan 22, 2009, 11:23:17 PM1/22/09
to bbe...@googlegroups.com
On 22-Jan-2009, at 20:09, Daniel Lord wrote:
> I set it up in my config file:
>
> [core]
> editor = bbedit

Well, you need some flags there. I'd start with... oh, lemme
think.... try

bbedit -w --resume

or maybe just

bbedit -w

both should work, it's simply a matter of which one behaves the way
you want it to.

--
Advance and attack! Attack and destroy! Destroy and rejoice!

Daniel Lord

unread,
Jan 23, 2009, 10:27:54 AM1/23/09
to BBEdit Talk
I followed Jim's suggestion and it now works as expected. I didn't
find that in the manual but probably because I didn't think to try the
man page for the command line version due to some whimsical momentary
loss of my senses. The description of the wait and resume option are
in there. Thanks.
Reply all
Reply to author
Forward
0 new messages