diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2007-12-02 06:07:55 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-09 01:19:44 -0800 |
commit | 5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f (patch) | |
tree | 75c099f90edef7ea8debf2a5021f0fc661eb0b05 /Documentation | |
parent | Documentation: describe -i/--info option to "git-help" (diff) | |
download | tgif-5d6491c7c7536ab930a6e9ce2ec3b5249d4c283f.tar.xz |
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>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile index de11ee0192..f0df0b0d28 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -29,6 +29,7 @@ DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT)) prefix?=$(HOME) bindir?=$(prefix)/bin +htmldir?=$(prefix)/share/doc/git-doc mandir?=$(prefix)/share/man man1dir=$(mandir)/man1 man5dir=$(mandir)/man5 @@ -95,6 +96,9 @@ install-info: info echo "No directory found in $(DESTDIR)$(infodir)" >&2 ; \ fi +install-html: html + sh ./install-webdoc.sh $(DESTDIR)$(htmldir) + ../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE $(MAKE) -C ../ GIT-VERSION-FILE |