Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git-web--browse: invoke kfmclient directly

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:52:04

Jeff King [off-list ref] writes:
On Mon, Sep 19, 2011 at 01:42:23PM -0700, Junio C Hamano wrote:
quoted
quoted
quoted
Yeah, I agree, and the dq around $browser_cmd is kind of important, too,
for that to work and be readable.
Oops, good catch. Probably the most readable version would be:

  eval "\"$browser_cmd\"" '"$@"'
Actually I didn't mean that double dq.

In fact, if browser_cmd is meant to be split as a shell snippet, I do not
think you want the string seen by eval to have dq around the expanded
version of $browser_cmd.  And I tend to prefer feeding a single string to
eval, so the version in your message I quoted originally looks good to me.

Unless I am missing something here...?
Oh right. Sorry, I read your comment, thought that's what you meant, and
that I had overlooked something. Forgetting that it was intentional to
leave off the quotes inside.

So yeah, my original is right. I just got turned around in all of the
discussion.
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?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help