From: Tait <git.git@t41t.com>
To: Markus Heidelberg <markus.heidelberg@web.de>
Cc: git@vger.kernel.org
Subject: Re: using gvim as editor on Windows
Date: Mon, 8 Mar 2010 18:45:23 -0800 [thread overview]
Message-ID: <20100309024523.GU2480@ece.pdx.edu> (raw)
In-Reply-To: <201003090032.10037.markus.heidelberg@web.de>
> First of all: do you have the problems in cmd.exe or Git Bash or both?
cmd.exe
I've never used git bash until now, but the behavior is the same there.
> > Does calling the .exe directly work for you? If I call gvim.exe directly
> > (with or without -f -- it doesn't matter), it opens a new file called
> > $@.
>
> I don't know where the $@ should come from.
It comes from line 33 of editor.c, in launch_editor().
if (strcmp(editor, ":")) {
/* ... */
if (strcspn(editor, "$ \t'") != len) {
/* there are specials */
strbuf_addf(&arg0, "%s \"$@\"", editor);
args[i++] = "sh";
args[i++] = "-c";
args[i++] = arg0.buf;
}
args[i++] = editor;
args[i++] = path;
args[i] = NULL;
/* ... */
}
It looks like this was added to detect EDITOR=: but it also
manages to catch Windows paths. I'm not familiar with the EDITOR=:
convention. What is that supposed to indicate? Can we narrow the
detection to that specific case, or does a : anywhere in EDITOR need
to be handled this way?
Rebase doesn't use launch_editor, instead just calling the editor
directly. Coming up with a combination of quoting and escaping that
can pass both cases will be difficult or impossible.
It appears that e97c9a removed the code above from editor.c, but
it's still present in prepare_shell_cmd() with even more legal
filename characters like = and ;.
Thanks for the help Markus.
Tait
next prev parent reply other threads:[~2010-03-09 12:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-06 7:06 using gvim as editor on Windows Tait
2010-03-06 7:22 ` Jacob Helwig
2010-03-06 7:37 ` Tait
2010-03-06 12:17 ` Markus Heidelberg
2010-03-08 18:54 ` Tait
2010-03-08 23:32 ` Markus Heidelberg
2010-03-09 2:45 ` Tait [this message]
2010-03-09 20:07 ` Junio C Hamano
2010-03-11 9:04 ` Tait
2010-03-11 9:36 ` Johannes Sixt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100309024523.GU2480@ece.pdx.edu \
--to=git.git@t41t.com \
--cc=git@vger.kernel.org \
--cc=markus.heidelberg@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).