{"thread":{"id":"12852","subject":"[PATCH] documentation: help: add info about \"man.<tool>.cmd\" config var","startedAt":"2008-03-25T06:21:10Z","lastAt":"2008-03-26T01:00:15Z","messageCount":2,"participants":["Christian Couder","Xavier Maillard"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"73003","messageId":"20080325072111.7a8774bd.chriscool@tuxfamily.org","threadId":"12852","inReplyTo":null,"subject":"[PATCH] documentation: help: add info about \"man.<tool>.cmd\" config var","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2008-03-25T06:21:10Z","receivedAt":"2008-03-25T06:21:10Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"This patch also describes the current behavior for \"konqueror\" and\nhow to modify it using \"man.<tool>.cmd\" if needed.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n Documentation/config.txt   |    5 ++++\n Documentation/git-help.txt |   48 +++++++++++++++++++++++++++++++++++++++----\n 2 files changed, 48 insertions(+), 5 deletions(-)\n\n\tThis should be applied on top of my previous patches:\n\n\t[PATCH 1/2] help: use man viewer path from \"man.<tool>.path\" config var\n\t[PATCH 2/2] documentation: help: add \"man.<tool>.path\" config variable\n\t[PATCH] help: use \"man.<tool>.cmd\" as custom man viewer command\n\n\tI can resend a 4 patches series if needed.\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 81a6b2c..6d9a3e2 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -761,6 +761,11 @@ man.viewer::\n \tSpecify the programs that may be used to display help in the\n \t'man' format. See linkgit:git-help[1].\n \n+man.<tool>.cmd::\n+\tSpecify the command to invoke the specified man viewer. The\n+\tspecified command is evaluated in shell with the man page\n+\tpassed as argument. (See linkgit:git-help[1].)\n+\n man.<tool>.path::\n \tOverride the path for the given tool that may be used to\n \tdisplay help in the 'man' format. See linkgit:git-help[1].\ndiff --git a/Documentation/git-help.txt b/Documentation/git-help.txt\nindex 4c6cb21..bfbba9e 100644\n--- a/Documentation/git-help.txt\n+++ b/Documentation/git-help.txt\n@@ -82,22 +82,28 @@ man.viewer\n ~~~~~~~~~~\n \n The 'man.viewer' config variable will be checked if the 'man' format\n-is chosen. Only the following values are currently supported:\n+is chosen. The following values are currently supported:\n \n * \"man\": use the 'man' program as usual,\n * \"woman\": use 'emacsclient' to launch the \"woman\" mode in emacs\n (this only works starting with emacsclient versions 22),\n-* \"konqueror\": use a man KIO slave in konqueror.\n+* \"konqueror\": use 'kfmclient' to open the man page in a new konqueror\n+tab (see 'Note about konqueror' below).\n \n-Multiple values may be given to this configuration variable. Their\n-corresponding programs will be tried in the order listed in the\n-configuration file.\n+Values for other tools can be used if there is a corresponding\n+'man.<tool>.cmd' configuration entry (see below).\n+\n+Multiple values may be given to the 'man.viewer' configuration\n+variable. Their corresponding programs will be tried in the order\n+listed in the configuration file.\n \n For example, this configuration:\n \n+------------------------------------------------\n \t[man]\n \t\tviewer = konqueror\n \t\tviewer = woman\n+------------------------------------------------\n \n will try to use konqueror first. But this may fail (for example if\n DISPLAY is not set) and in that case emacs' woman mode will be tried.\n@@ -113,6 +119,38 @@ can configure the absolute path to konqueror by setting\n 'man.konqueror.path'. Otherwise, 'git help' assumes the tool is\n available in PATH.\n \n+man.<tool>.cmd\n+~~~~~~~~~~~~~~\n+\n+When the man viewer, specified by the 'man.viewer' configuration\n+variables, is not among the supported ones, then the corresponding\n+'man.<tool>.cmd' configuration variable will be looked up. If this\n+variable exists then the specified tool will be treated as a custom\n+command and a shell eval will be used to run the command with the man\n+page passed as arguments.\n+\n+Note about konqueror\n+~~~~~~~~~~~~~~~~~~~~\n+\n+When 'konqueror' is specified in the 'man.viewer' configuration\n+variable, we launch 'kfmclient' to try to open the man page on an\n+already opened konqueror in a new tab if possible.\n+\n+For consistency, we also try such a trick if 'man.konqueror.path' is\n+set to something like 'A_PATH_TO/konqueror'. That means we will try to\n+launch 'A_PATH_TO/kfmclient' instead.\n+\n+If you really want to use 'konqueror', then you can use something like\n+the following:\n+\n+------------------------------------------------\n+\t[man]\n+\t\tviewer = konq\n+\n+\t[man \"konq\"]\n+\t\tcmd = A_PATH_TO/konqueror\n+------------------------------------------------\n+\n Note about git config --global\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n \n-- \n1.5.5.rc0.124.g91c15.dirty\n"},{"id":"73095","messageId":"200803260100.m2Q10FEd005105@localhost.localdomain","threadId":"12852","inReplyTo":"20080325072111.7a8774bd.chriscool@tuxfamily.org","subject":"Re: [PATCH] documentation: help: add info about \"man.<tool>.cmd\" config var","fromName":"Xavier Maillard","fromEmail":"xma@gnu.org","sentAt":"2008-03-26T01:00:15Z","receivedAt":"2008-03-26T01:00:15Z","isPatch":true,"sender":{"key":"xma@gnu.org","avatar":null},"body":"\nThe given explanations are ok (for me).\n\n\tXavier\n-- \nhttp://www.gnu.org\nhttp://www.april.org\nhttp://www.lolica.org\n"}]}