Template:Gitlab clone: Difference between revisions

Full support for aliased and numbered parameters, with examples to demonstrate the capabilities.
(Switch to {{repo link/doc infrastructure clone}}.)
(Full support for aliased and numbered parameters, with examples to demonstrate the capabilities.)
Line 1: Line 1:
{{#tag:nowiki|{{repo link
{{#tag:nowiki|{{repo link
| site                         = gl
| site                                         = gl
| cmd                           = git clone
| cmd                                           = git clone
| opt{{#if:{{{opt|}}}||NULL}}   = {{{opt}}}
| opt{{#if:{{{opt|}}}||NULL}}                   = {{{opt}}}
| protocol                     = https
| protocol                                     = https
| type                         = git
| type                                         = git
| proj{{#if:{{{proj|}}}||NULL}} = {{{proj}}}
| user{{#if:{{{user|{{{u|}}}}}}||NULL}}        = {{{user|{{{u}}}}}}
| repo{{#if:{{{repo|}}}||NULL}} = {{{repo}}}
| proj{{#if:{{{proj|{{{p|{{{1|}}}}}}}}}||NULL}} = {{{proj|{{{p|{{{1}}}}}}}}}
| post{{#if:{{{post|}}}||NULL}} = {{{post}}}
| repo{{#if:{{{repo|{{{r|{{{2|}}}}}}}}}||NULL}} = {{{repo|{{{r|{{{2}}}}}}}}}
| full     = 1
| post{{#if:{{{post|}}}||NULL}}                 = {{{post}}}
| full                                         = 1
}}}}<noinclude>
}}}}<noinclude>


Line 15: Line 16:
| site    = gitlab
| site    = gitlab
| examples =
| examples =
===== The extra500 repository =====
This should produce the text <code><nowiki>git clone -v https://gitlab.com/extra500/extra500.git</nowiki></code>.
This should produce the text <code><nowiki>git clone -v https://gitlab.com/extra500/extra500.git</nowiki></code>.


Line 29: Line 31:
}}}}.
}}}}.


}}
===== Aliased parameters =====
This is for <code><nowiki>git clone -v https://gitlab.com/extra500/extra500.git</nowiki></code>.


</noinclude>
{{obr}}#tag:code{{!}}{{obr}}gitlab clone
{{!}} p = extra500
{{!}} r = extra500
{{cbr}}{{cbr}}.
 
{{#tag:code|{{gitlab clone
| p = extra500
| r = extra500
}}}}.
 
===== Numbered parameters =====
This is for <code><nowiki>git clone -v https://gitlab.com/extra500/extra500.git</nowiki></code>.
 
{{obr}}#tag:code{{!}}{{obr}}gitlab clone {{!}} extra500 {{!}} extra500 {{cbr}}{{cbr}}.
 
{{#tag:code|{{gitlab clone | extra500 | extra500 }}}}.
 
}}</noinclude>