]> git.ipfire.org Git - thirdparty/git.git/commit - Documentation/Makefile
git-help: add -w|--web option to display html man page in a browser.
authorChristian Couder <chriscool@tuxfamily.org>
Sun, 2 Dec 2007 05:07:55 +0000 (06:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 9 Dec 2007 09:19:44 +0000 (01:19 -0800)
commit5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f
tree75c099f90edef7ea8debf2a5021f0fc661eb0b05
parent45533d2694d480be86112f2da36d555e7373ba24
git-help: add -w|--web option to display html man page in a browser.

Now when using "git help -w cmd", we will try to show the HTML man
page "git-cmd.html" in your prefered web browser.

To do that "help.c" code will call a new shell script
"git-browse-help".

This currently works only if the HTML versions of the man page
have been installed in $(htmldir) (typically "/usr/share/doc/git-doc"),
so new target to do that is added to "Documentation/Makefile".

The browser to use can be configured using the "web.browser"
config variable.

We try to open a new tab in an existing web browser, if possible.

The code in "git-browse-help" is heavily stolen from "git-mergetool"
by Theodore Y. Ts'o. Thanks.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/Makefile
Makefile
git-browse-help.sh [new file with mode: 0755]
help.c