From: Jeff King Date: Mon, 19 Sep 2011 22:23:25 GMT Subject: Re: [PATCH] git-web--browse: invoke kfmclient directly Message-ID: <20110919222325.GA4056@sigill.intra.peff.net> In-Reply-To: On Mon, Sep 19, 2011 at 11:46:37PM +0200, Andreas Schwab wrote: > Junio C Hamano writes: > > > Thinking about it a bit more, I suspect that we should just let the 'eval' > > grab value out of the $browser_cmd variable, i.e. > > > > eval '$browser_cmd "$@"' > > > > no? > > That's a Useless Use of Eval and 100% equivalent to this: > > $browser_cmd "$@" Yeah. Doing: eval '$browser_cmd' will do the whitespace-breaking we want, but it won't interpret actual shell magic characters, which we need in order to be compatible with other parts of git (which typically use "sh -c ..."). E.g.: foo=worked browser_cmd='echo $foo' # fail $browser_cmd # fail eval '$browser_cmd' # works eval "$browser_cmd" -Peff