This introduces a new macro "link-git" which prepends "git-" or "git " to the link target, depending on the backend. We keep the dash for the docbook backend because some man viewers depend on it. There are no dashes for the html backend. This patch also renames the existing "linkgit" macro to "linkgitasis", in preparation for the upcoming changes. This makes it easier to split the changes into parts: dashed form for server type programmes, dashless form for all other commands. Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx> --- Documentation/asciidoc.conf | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 40d43b7..efc8bd3 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -1,11 +1,15 @@ -## linkgit: macro +## linkgitasis: macro # -# Usage: linkgit:command[manpage-section] +# Usage: linkgitasis:command[manpage-section] # # Note, {0} is the manpage section, while {target} is the command. # # Show GIT link as: <command>(<section>); if section is defined, else just show # the command. +# +## link-git: macro +# +# Like linkgitasis, but prepends "git " or "git -" to the target, depending on the backend. [attributes] asterisk=* @@ -16,11 +20,16 @@ endsb=] tilde=~ ifdef::backend-docbook[] -[linkgit-inlinemacro] +[linkgitasis-inlinemacro] {0%{target}} {0#<citerefentry>} {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>} {0#</citerefentry>} +[link-git-inlinemacro] +{0%{target}} +{0#<citerefentry>} +{0#<refentrytitle>git-{target}</refentrytitle><manvolnum>{0}</manvolnum>} +{0#</citerefentry>} endif::backend-docbook[] ifdef::backend-docbook[] @@ -62,6 +71,8 @@ endif::backend-docbook[] endif::doctype-manpage[] ifdef::backend-xhtml11[] -[linkgit-inlinemacro] +[linkgitasis-inlinemacro] <a href="{target}.html">{target}{0?({0})}</a> +[link-git-inlinemacro] +<a href="{target}.html">git {target}{0?({0})}</a> endif::backend-xhtml11[] -- 1.6.0.1.308.gede4c -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html