Template:Github clone: Difference between revisions

Jump to navigation Jump to search
Full support for aliased and numbered parameters, with examples to demonstrate the capabilities.
m (Removed the unused 'cmd' parameter from the example.)
(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                         = gh
| site                                         = gh
| cmd                           = git clone
| cmd                                           = git clone
| opt{{#if:{{{opt|}}}||NULL}}   = {{{opt}}}
| opt{{#if:{{{opt|}}}||NULL}}                   = {{{opt}}}
| protocol                     = https
| protocol                                     = https
| type                         = git
| type                                         = git
| user{{#if:{{{user|}}}||NULL}} = {{{user}}}
| user{{#if:{{{user|{{{u|}}}}}}||NULL}}         = {{{user|{{{u}}}}}}
| proj{{#if:{{{proj|}}}||NULL}} = {{{proj}}}
| proj{{#if:{{{proj|{{{p|{{{1|}}}}}}}}}||NULL}} = {{{proj|{{{p|{{{1}}}}}}}}}
| repo{{#if:{{{repo|}}}||NULL}} = {{{repo}}}
| repo{{#if:{{{repo|{{{r|{{{2|}}}}}}}}}||NULL}} = {{{repo|{{{r|{{{2}}}}}}}}}
| post{{#if:{{{post|}}}||NULL}} = {{{post}}}
| post{{#if:{{{post|}}}||NULL}}                 = {{{post}}}
| full                         = 1
| full                                         = 1
}}}}<noinclude>
}}}}<noinclude>


Line 17: Line 17:
| user    = 1
| user    = 1
| examples =
| examples =
===== The c172p-detailed aircraft =====
This is for cloning the c172p-detailed aircraft with <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.
This is for cloning the c172p-detailed aircraft with <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.


Line 29: Line 30:
}}}}.
}}}}.


}}
===== Aliased parameters =====
This is for <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.


</noinclude>
{{obr}}#tag:code{{!}}{{obr}}github clone
  {{!}} u = Juanvvc
  {{!}} r = c172p-detailed
{{cbr}}{{cbr}}.
 
{{#tag:code|{{github clone
  | u = Juanvvc
  | r = c172p-detailed
}}}}.
 
===== Numbered parameters =====
This is for <code><nowiki>git clone https://github.com/Juanvvc/c172p-detailed.git</nowiki></code>.
 
{{obr}}#tag:code{{!}}{{obr}}github clone {{!}} Juanvvc {{!}} c172p-detailed {{cbr}}{{cbr}}.
 
{{#tag:code|{{github clone | Juanvvc | c172p-detailed }}}}.
 
}}</noinclude>

Navigation menu