From: Jonathan Nieder Date: Mon, 04 May 2015 23:11:36 GMT Subject: Re: Bug: git-p4 edit_template() and P4EDITOR w/options Message-ID: <20150504231136.GY5467@google.com> In-Reply-To: Junio C Hamano wrote: > Junio C Hamano 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))] *nod* run-command.c does system(["sh", "-c", ('%s "$@"' % editor), editor, template_file]) to avoid having to figure out how to shell-quote template_file.