3 # Usage: gitlink:command[manpage-section]
5 # Note, {0} is the manpage section, while {target} is the command.
7 # Show GIT link as: <command>(<section>); if section is defined, else just show
16 ifdef::backend-docbook[]
20 {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
22 endif::backend-docbook[]
24 ifdef::backend-docbook[]
25 # "unbreak" docbook-xsl v1.68 for manpages. v1.69 works with or without this.
27 <example><title>{title}</title>
32 endif::backend-docbook[]
34 ifdef::backend-xhtml11[]
36 <a href="{target}.html">{target}{0?({0})}</a>
37 endif::backend-xhtml11[]
41 ifdef::backend-docbook[]
44 <refentrytitle>stg {target}</refentrytitle><manvolnum>1</manvolnum>
46 endif::backend-docbook[]
48 ifdef::backend-xhtml11[]
50 <a href="stg-{target}.html">stg {target}(1)</a>
51 endif::backend-xhtml11[]
55 {sys:../stg help|grep " {target}" | tr -s ' '| cut -d' ' -f3-}