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

Re: [PATCH 2/2] help: add "man.viewer" config var to use "woman" or "konqueror"

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2008, 05:08 UTC
Message-ID
<7vodaeua0u.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080217205252.ff7ea434.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 13 quoted lines
>  static void show_man_page(const char *git_cmd)
>  {
>  	const char *page = cmd_to_page(git_cmd);
>  	setup_man_path();
> -	execlp("man", "man", page, NULL);
> +	if (!man_viewer || !strcmp(man_viewer, "man"))
> +		execlp("man", "man", page, NULL);
> +	if (!strcmp(man_viewer, "woman"))
> +		exec_woman_emacs(page);
> +	if (!strcmp(man_viewer, "konqueror"))
> +		exec_man_konqueror(page);
> +	die("'%s': unsupported man viewer.", man_viewer);
>  }

I have to wonder if it makes sense to just define the interface to launch an external user-supplied command, and have that command line determine what actually should happen, e.g. inspect DISPLAY and check emacs version etc.

Previous: Christian Couder
Message 2 of 2 in “help: add "man.viewer" config var to use "woman" or "konqueror"”
  1. 2/2 help: add "man.viewer" config var to use "woman" or "konqueror"Christian Couder, Feb 17, 2008
  2. Junio C HamanoFeb 18, 2008

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.