Re: [PATCH] git-web--browse: invoke kfmclient directly
- From
Jeff King <peff@peff.net>
- Date
- Sep 19, 2011, 22:23 UTC
- Message-ID
- <20110919222325.GA4056@sigill.intra.peff.net>
- In-Reply-To
- <m2bougtdc2.fsf@igel.home>
On Mon, Sep 19, 2011 at 11:46:37PM +0200, Andreas Schwab wrote:
Show 12 quoted lines
> Junio C Hamano <gitster@pobox.com> 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