From: Junio C Hamano <gitster@pobox.com>
To: Christian Couder <chriscool@tuxfamily.org>
Cc: git@vger.kernel.org, Pascal Obry <pascal@obry.net>
Subject: Re: [PATCH 2/2] help: add "man.viewer" config var to use "woman" or "konqueror"
Date: Sun, 17 Feb 2008 21:08:17 -0800 [thread overview]
Message-ID: <7vodaeua0u.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080217205252.ff7ea434.chriscool@tuxfamily.org> (Christian Couder's message of "Sun, 17 Feb 2008 20:52:52 +0100")
Christian Couder <chriscool@tuxfamily.org> 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.
prev parent reply other threads:[~2008-02-18 5:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-17 19:52 [PATCH 2/2] help: add "man.viewer" config var to use "woman" or "konqueror" Christian Couder
2008-02-18 5:08 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vodaeua0u.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=pascal@obry.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).