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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christian Couder <chriscool@xxxxxxxxxxxxx> writes:

>  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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux