BBEdit as EDITOR

273 views
Skip to first unread message

Matthew Montgomery

unread,
Nov 27, 2017, 12:15:14 PM11/27/17
to bbe...@googlegroups.com
Hi all,

I have BBEdit setup as my terminal editor via... export EDITOR="bbedit --wait --resume"

While using git from the command line, this all works very well for editing the COMMIT_EDITMSG file when BBEdit is already running. If I issue a "git commit" when BBEdit is not running, it is launched as expected but it seems that the bbedit command line tool exits after loading the specified file not upon closing the file.

Is there some other way to make this work when launching BBEdit? Perhaps chain a separate command that only uses the launch option?

Thanks!

--
Matthew

Sam Hathaway

unread,
Nov 27, 2017, 12:49:31 PM11/27/17
to bbe...@googlegroups.com

Not sure if this’ll be helpful for you, but I have a slightly different EDITOR setup and can’t replicate your issue. I have EDITOR set to /Users/sam/install/bin/bbedit-wait, and bbedit-wait contains:

#!/bin/sh

exec /usr/local/bin/bbedit --wait --resume "$@"

I did this because some programs have issues with EDITOR values that contain shell metacharacters, but maybe it’d solve your problem too?

Hope this helps.
-sam

--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"sup...@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+un...@googlegroups.com.
To post to this group, send email to bbe...@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Matthew Montgomery

unread,
Nov 27, 2017, 2:23:04 PM11/27/17
to bbe...@googlegroups.com
Oh I take that back. My testing methodology was flawed. :-)

I am still seeing the command line tool exit without waiting when BBEdit hasn't already been launched. I will keep trying things and post again if I find a working solution.

Thanks.

--
Matthew

> On Nov 27, 2017, at 12:59 PM, Matthew Montgomery <mat...@signed8bit.com> wrote:
>
> Thanks Sam!
>
> That did it. Switching to export EDITOR="bbedit --wait --resume $@" has it working as I'd want.
>
> Cheers,
>
> --
> Matthew

Matthew Montgomery

unread,
Nov 27, 2017, 2:23:04 PM11/27/17
to bbe...@googlegroups.com
Thanks Sam!

That did it. Switching to export EDITOR="bbedit --wait --resume $@" has it working as I'd want.

Cheers,

--
Matthew

> On Nov 27, 2017, at 11:49 AM, Sam Hathaway <list....@munkynet.org> wrote:
>
Reply all
Reply to author
Forward
0 new messages