Skip to content
  • Christian Couder's avatar
    git-help: add -w|--web option to display html man page in a browser. · 5d6491c7
    Christian Couder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarChristian Couder <chriscool@tuxfamily.org>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    5d6491c7