git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?
Previous: Evan FarrerNext: Avery Pennarun
Message 2 of 6 in “Add support for the google-chrome web browser”
  1. Add support for the google-chrome web browserEvan Farrer, Jan 5, 2010
  2. Junio C HamanoJan 5, 2010
  3. Avery PennarunJan 5, 2010
  4. Junio C HamanoJan 5, 2010
  5. Avery PennarunJan 5, 2010
  6. Junio C HamanoJan 5, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.