Re: [PATCH/RFC] Add support for the google-chrome web browser
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 5, 2010, 05:40 UTC
- Message-ID
- <7vr5q56rew.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20100105051906.GA22799@efarrerlx.appsig.com>
Evan Farrer <evan.farrer@gmail.com> writes:
Show 15 quoted lines
> Signed-off-by: Evan Farrer <Evan.Farrer@gmail.com> > --- > Documentation/git-web--browse.txt | 1 + > git-web--browse.sh | 6 +++--- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/Documentation/git-web--browse.txt b/Documentation/git-web--browse.txt > index 278cf73..0994139 100644 > --- a/Documentation/git-web--browse.txt > +++ b/Documentation/git-web--browse.txt > @@ -25,6 +25,7 @@ The following browsers (or commands) are currently supported: > * links > * lynx > * dillo > +* google-chrome
Hmmm, the support added by this patch for the chrome is, together with w3m, links, and open, to simply run the command with given arguments without any other magic.
Perhaps valid_custom_tool() function should be changed to simply return $1 if $browser_cmd is not found, like this:
valid_custom_tool ()
{
browser_cmd=$(git config "browser.$1.cmd")
: ${browser_cmdn:=$1}
}Then we don't even have to add any specific support for "google-chrome" or anything that takes "$command $path..." and opens the documents.
Is there a downside in this approach?