@matheusbsbs / matheus-bagliano / commits / 0bb6400958
Fork 0

documentation: help: add info about "man.<tool>.cmd" config var

This patch also describes the current behavior for "konqueror" and how to modify it using "man.<tool>.cmd" if needed. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Christian Couder committed Apr 25, 2008 at 08:25 UTC 0bb64009586b7fd674b1c3238f041b61c5d03f91
2 files changed +48 -5
Documentation/config.txt
+5
@@ -805,6 +805,11 @@ merge.<driver>.recursive::
805 performing an internal merge between common ancestors.
806 See linkgit:gitattributes[5] for details.
807
808 +man.<tool>.cmd::
809 + Specify the command to invoke the specified man viewer. The
810 + specified command is evaluated in shell with the man page
811 + passed as argument. (See linkgit:git-help[1].)
812 +
813 man.<tool>.path::
814 Override the path for the given tool that may be used to
815 display help in the 'man' format. See linkgit:git-help[1].
Documentation/git-help.txt
+43 -5
@@ -82,22 +82,28 @@ man.viewer
82 ~~~~~~~~~~
83
84 The 'man.viewer' config variable will be checked if the 'man' format
85 -is chosen. Only the following values are currently supported:
85 +is chosen. The following values are currently supported:
86
87 * "man": use the 'man' program as usual,
88 * "woman": use 'emacsclient' to launch the "woman" mode in emacs
89 (this only works starting with emacsclient versions 22),
90 -* "konqueror": use a man KIO slave in konqueror.
90 +* "konqueror": use 'kfmclient' to open the man page in a new konqueror
91 +tab (see 'Note about konqueror' below).
92
92 -Multiple values may be given to this configuration variable. Their
93 -corresponding programs will be tried in the order listed in the
94 -configuration file.
93 +Values for other tools can be used if there is a corresponding
94 +'man.<tool>.cmd' configuration entry (see below).
95 +
96 +Multiple values may be given to the 'man.viewer' configuration
97 +variable. Their corresponding programs will be tried in the order
98 +listed in the configuration file.
99
100 For example, this configuration:
101
102 +------------------------------------------------
103 [man]
104 viewer = konqueror
105 viewer = woman
106 +------------------------------------------------
107
108 will try to use konqueror first. But this may fail (for example if
109 DISPLAY is not set) and in that case emacs' woman mode will be tried.
@@ -113,6 +119,38 @@ can configure the absolute path to konqueror by setting
119 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is
120 available in PATH.
121
122 +man.<tool>.cmd
123 +~~~~~~~~~~~~~~
124 +
125 +When the man viewer, specified by the 'man.viewer' configuration
126 +variables, is not among the supported ones, then the corresponding
127 +'man.<tool>.cmd' configuration variable will be looked up. If this
128 +variable exists then the specified tool will be treated as a custom
129 +command and a shell eval will be used to run the command with the man
130 +page passed as arguments.
131 +
132 +Note about konqueror
133 +~~~~~~~~~~~~~~~~~~~~
134 +
135 +When 'konqueror' is specified in the 'man.viewer' configuration
136 +variable, we launch 'kfmclient' to try to open the man page on an
137 +already opened konqueror in a new tab if possible.
138 +
139 +For consistency, we also try such a trick if 'man.konqueror.path' is
140 +set to something like 'A_PATH_TO/konqueror'. That means we will try to
141 +launch 'A_PATH_TO/kfmclient' instead.
142 +
143 +If you really want to use 'konqueror', then you can use something like
144 +the following:
145 +
146 +------------------------------------------------
147 + [man]
148 + viewer = konq
149 +
150 + [man "konq"]
151 + cmd = A_PATH_TO/konqueror
152 +------------------------------------------------
153 +
154 Note about git config --global
155 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156