From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johannes Schindelin Subject: Re: [PATCH] launch_editor(): allow spaces in the filename Date: Mon, 10 Mar 2008 23:18:00 +0100 (CET) Message-ID: References: <200803102232.13727.johannes.sixt@telecom.at> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Zeng.Shixin@gmail.com, theevancarroll@gmail.com, git@vger.kernel.org, gitster@poxbox.com To: Johannes Sixt X-From: git-owner@vger.kernel.org Mon Mar 10 23:19:11 2008 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1JYqKi-0001c9-1p for gcvg-git-2@gmane.org; Mon, 10 Mar 2008 23:19:00 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbYCJWSF (ORCPT ); Mon, 10 Mar 2008 18:18:05 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751450AbYCJWSE (ORCPT ); Mon, 10 Mar 2008 18:18:04 -0400 Received: from mail.gmx.net ([213.165.64.20]:47128 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751107AbYCJWSB (ORCPT ); Mon, 10 Mar 2008 18:18:01 -0400 Received: (qmail invoked by alias); 10 Mar 2008 22:17:59 -0000 Received: from host86-138-198-40.range86-138.btcentralplus.com (EHLO racer.home) [86.138.198.40] by mail.gmx.net (mp016) with SMTP; 10 Mar 2008 23:17:59 +0100 X-Authenticated: #1490710 X-Provags-ID: V01U2FsdGVkX1+6ZfAHogW6kavFyuVk1yI1AhRmaP+jKUfeGea9nB HUbaIewH8JIfhL X-X-Sender: gene099@racer.site In-Reply-To: <200803102232.13727.johannes.sixt@telecom.at> User-Agent: Alpine 1.00 (LSU 882 2007-12-20) X-Y-GMX-Trusted: 0 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Hi, On Mon, 10 Mar 2008, Johannes Sixt wrote: > On Monday 10 March 2008 21:42, Johannes Schindelin wrote: > > For some reason, the construct > > > > sh -c "$0 \"$@\"" > > > > does not pick up quotes in as expected. So replace $0 with > > . > > No surprise. It must be > > sh -c '"$0" "$@"' > > Note the extra quotes around $0. > > > args[i++] = "sh"; > > args[i++] = "-c"; > > - args[i++] = "$0 \"$@\""; > > + args[i++] = arg0.buf; > > IOW: > > + args[i++] = "\"$0\" \"$@\""; Isn't this wrong? What would this do with a core.editor like this: [core] editor = this-editor --with-this --option Hmm? Ciao, Dscho