Re: msysgit, help: teach git help to open html from /doc/git/html/
From: Steffen Prohaska <hidden>
Date: 2016-06-15 22:43:28
On Aug 12, 2007, at 2:16 AM, Nguyen Thai Ngoc Duy wrote:
On 8/11/07, Nguyen Thai Ngoc Duy [off-list ref] wrote:quoted
This reminds me a patch I made before: http://thread.gmane.org/gmane.comp.version-control.git/49217/ focus=49575And the second patch: http://article.gmane.org/gmane.comp.version-control.git/49216quoted
With a little modification you can use ShellExecute to open html if there is no suitable program to open it. The last commit on mingw.git's mob branch does that (not based on my mentioned patch though).
So we have three approached now: 1) Nguyen's approach using '--html'/core.help=html to explicitly choose html as the format of choice. The core.htmlprogram is used and a printf style format string can be used to specify required command line parameters. 2) Junio's light-weight core.helpcmd, which gets passed the string that would normally be passed to 'man'. Helpcmd needs to figure out how to do the right thing. Most likely helpcmd would be a small shell script that does the mapping to a file or url for displaying the help. But it can also be a more complex thing, for example load a Windows chm file and jump to a specific anchor, or whatsoever. 3) Steffen's msysgit specific code path to display always locally installed html pages on Windows, and never display 'man' pages. From my perspective, (3) would be the fastest way to get a useful git help in msysgit. It only needs to be applied and shipped. But it provides no benefit for git.git on other architectures. (2) is a very light-weight extension to core git, yet capable of providing everything we need, or can think of in the future. It makes sense to me to delegate the details how to find the help, based on the git command, to an external helper. Maybe I work a bit more on Junio's approach later the day. I would like to see a useful help system in msysgit before advertising it to a larger audience that has no git experience. Steffen