Re: Bug: git-p4 edit_template() and P4EDITOR w/options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 4, 2015, 22:44 UTC
- Message-ID
- <xmqqvbg8netq.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqzj5knf2t.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> Perhaps a single-liner patch like this would work? > > - system([editor, template_file]) > + system(["sh", "-c", editor, template_file])
Nah, scratch that. The list should be more like
["sh", "-c", "%s %s" % (editor, shlex.quote(template_file))]
if your Python has shlex.quote, that is; it may be pipes.quote instead.